CN117956033A - Network request processing method, device, equipment, medium and program product - Google Patents

Network request processing method, device, equipment, medium and program product Download PDF

Info

Publication number
CN117956033A
CN117956033A CN202211277952.9A CN202211277952A CN117956033A CN 117956033 A CN117956033 A CN 117956033A CN 202211277952 A CN202211277952 A CN 202211277952A CN 117956033 A CN117956033 A CN 117956033A
Authority
CN
China
Prior art keywords
routing
path
cost
service node
network request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211277952.9A
Other languages
Chinese (zh)
Inventor
王冬
施驭
李湘军
蒋靖
李欣
管琰平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211277952.9A priority Critical patent/CN117956033A/en
Publication of CN117956033A publication Critical patent/CN117956033A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application provides a network request processing method, a device, equipment, a medium and a program product, wherein the method comprises the following steps: receiving a first network request; acquiring a first routing path, and carrying out traffic routing on a first network request according to the first routing path; the first routing path is a routing path meeting a path selection rule related to routing cost in a plurality of routing paths from the initial service node to the target service node; acquiring the current routing cost redetermined according to the cost calculation index of each calling path in the first routing path; and determining a second routing path meeting the path selection rule from the plurality of routing paths according to the current routing cost so as to conveniently route the traffic of the second network request according to the second routing path. By the embodiment of the application, the flow routing can be carried out according to the better routing path for the network request, and the service quality of the network request is effectively improved.

Description

Network request processing method, device, equipment, medium and program product
Technical Field
The present application relates to the field of communications technologies, and in particular, to a network request processing method, a network request processing apparatus, a computer device, a computer readable storage medium, and a computer program product.
Background
With the rapid development of internet technology, the network structure of the internet is increasingly complex. When a network request arrives from a source node to a destination node, this may be achieved by different routing paths. However, there may be significant quality differences in network requests to implement traffic routing based on different routing paths. And the traffic routing is executed based on the optimal routing path, so that the service quality of the network request can be improved, and the use experience is improved. Traffic routing based on poor routing paths can greatly impact quality of service, and thus present a series of on-line quality of service problems. Therefore, how to accurately select the route path with better current stage to realize the traffic route of the network request is the current urgent problem to be solved.
Disclosure of Invention
The application provides a network request processing method, a device, equipment, a medium and a program product, which can route traffic for a network request according to a better route path, thereby effectively improving the service quality of the network request.
In a first aspect, the present application provides a method for processing a network request, where the method includes:
Receiving a first network request, and determining an initial service node and a target service node corresponding to the first network request;
Acquiring a first route path recorded currently, and carrying out traffic routing on the first network request according to the first route path; the first routing path is a routing path meeting a routing rule in a plurality of routing paths from the initial service node to the target service node, and the routing rule is associated with routing cost of each calling path in the routing paths;
acquiring the current routing cost of each calling path in the first routing path; the current route cost is a route cost redetermined according to a cost calculation index acquired by a target stage in the flow routing process, wherein the target stage comprises at least one of the following: a step of processing the first network request by calling the regulated point by the main regulation point in the calling path, and a processing step after the processing result of the first network request is obtained;
determining a second routing path meeting the path selection rule from the plurality of routing paths according to the current routing cost, so that when a second network request is received, traffic routing is performed on the second network request according to the second routing path; the second network request corresponds to the originating service node and the target service node.
In a second aspect, the present application provides a network request processing apparatus, including:
the data acquisition module is used for receiving a first network request and determining an initial service node and a target service node corresponding to the first network request;
the traffic routing module is used for acquiring a first routing path recorded currently and carrying out traffic routing on the first network request according to the first routing path; the first routing path is a routing path meeting a routing rule in a plurality of routing paths from the initial service node to the target service node, and the routing rule is associated with routing cost of each calling path in the routing paths;
The calculation module is used for acquiring the current routing cost of each calling path in the first routing path; the current route cost is a route cost redetermined according to a cost calculation index acquired by a target stage in the flow routing process, wherein the target stage comprises at least one of the following: a step of processing the first network request by calling the regulated point by the main regulation point in the calling path, and a processing step after the processing result of the first network request is obtained;
The calculation module is further configured to determine, according to the current routing cost, a second routing path that meets the path selection rule from the plurality of routing paths, so that when a second network request is received, traffic routing is performed on the second network request according to the second routing path; the second network request corresponds to the originating service node and the target service node.
In a third aspect, the present application provides a computer device comprising: the network request processing system comprises a processor, a storage device and a communication interface, wherein the processor, the communication interface and the storage device are mutually connected, the storage device stores executable program codes, and the processor is used for calling the executable program codes so as to realize the network request processing method.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program comprising program instructions for execution by a processor for implementing a network request processing method as described above.
In a fifth aspect, the present application provides a computer program product comprising a computer program or computer instructions for execution by a processor for implementing the network request processing method described above.
When receiving a network request, the application carries out flow routing on the network request according to the first routing path which is better at present, determines the current routing cost of each calling path in the first routing path in the flow routing process, and recalculates the second routing path which is better at present based on the current routing cost so as to carry out flow routing on the subsequent network request according to the second routing path. The method ensures that the routing cost of each calling path and the path selection rule are determined when the preferred routing path is searched, and the routing cost of the calling path is determined based on the acquired cost calculation index in the flow routing process, so that the calculation of the routing cost can be fused with the multi-dimensional index feature, the preferred routing path can be acquired more accurately, and the reliability of the selection of the preferred routing path is improved. Compared with a fixed route obtained by assigning route cost by using configuration data of a service node, the application can dynamically update the route cost of each calling route after executing the traffic route of the network request, so as to calculate the preferred route accurately and in real time, route the traffic of the network request according to the preferred route, effectively improve the service quality of the network request and solve the service quality problem caused by unreasonable network traffic route.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1A is a schematic diagram of a weighted round robin routing algorithm provided by an exemplary embodiment of the present application;
FIG. 1B is a schematic diagram of a routing algorithm based on local link routing costs according to an exemplary embodiment of the present application;
FIG. 1C is a schematic diagram of the architecture of a network request processing system according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a method for processing a network request according to an exemplary embodiment of the present application;
Fig. 3 is a schematic diagram of a network structure of a multi-level service node according to an exemplary embodiment of the present application;
FIG. 4 is a flow chart of another method for processing a network request according to an exemplary embodiment of the present application;
FIG. 5 is a flow chart of a process for traffic routing provided by an exemplary embodiment of the present application;
FIG. 6 is a schematic block diagram of a network request processing apparatus provided in an exemplary embodiment of the present application;
fig. 7 is a schematic block diagram of a computer device provided in an exemplary embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the descriptions of "first," "second," and the like in the embodiments of the present application are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a technical feature defining "first", "second" may include at least one such feature, either explicitly or implicitly.
For a better understanding of aspects of embodiments of the present application, related terms and concepts that may be related to embodiments of the present application are described below.
1. Network traffic: network requests in a distributed microservice system.
2. Request link: each master adjustment point in the service nodes of a plurality of layers is serially called with a corresponding adjusted point to form a request relation chain.
3. Heuristic algorithm: one feasible solution for each instance of the combinatorial optimization problem to be solved is given at an acceptable cost (referring to the cost in computing the time dimension and the space dimension), and the feasible solution needs to deviate less from the optimal solution.
4. A master adjustment point: the node that initiates the call in the network request is proactive.
5. The adjusted point: the called node in the network request may generally have a plurality of adjusted points for one master adjusting point, and a link formed by each master adjusting point and a corresponding adjusted point is a call path.
6. Routing cost: in the process of selecting a downstream regulated point to execute a network request, the master regulating point can use the resources such as a machine, a network, time and the like, and the cost can be a single characteristic or can be based on fusion of a plurality of characteristics. The smaller the routing cost, the greater the probability that the node is selected and performs the network request; the greater the routing cost, the less probability that a node will be selected and perform a network request.
7. Routing weights: the probability value to a downstream adjusted node may be used by the master adjustment node in selecting the node, typically as an inverse proportion function of the routing cost. The larger the routing weight value, the greater the probability that the node is selected and performs the network request; the smaller the routing weight value, the less probability that a node is selected and performs a network request.
8. Routing algorithm (i.e., path selection rule in the present application): the master adjustment node is based on routing weights or routing costs, policy algorithms or rules that are used in selecting which node downstream the traffic is to be distributed to.
The embodiment of the application can be applied to various fields or scenes such as cloud computing, cloud internet of things, cloud games, artificial intelligence, vehicle-mounted scenes, intelligent traffic, auxiliary driving and the like, and a few typical fields or scenes are described below.
Cloud computing (closed computing) refers to the delivery and usage mode of an IT infrastructure, meaning that required resources are obtained in an on-demand, easily scalable manner through a network; generalized cloud computing refers to the delivery and usage patterns of services, meaning that the required services are obtained in an on-demand, easily scalable manner over a network. Such services may be IT, software, internet related, or other services. According to the method and the device for obtaining the data, the data such as the current routing cost and the second routing path at the current moment can be stored on the cloud server, and when the different data are needed to be used, the data can be directly obtained on the cloud server, so that the data obtaining speed is greatly improved. The application is applied to the flow routing scenes of the micro-service and other systems related to cloud computing, can reduce the failure rate and flat response of the online service, and solves the online service quality problems of high failure rate and high request flat response possibly caused by unreasonable network flow routing.
Cloud gaming (Cloud gaming), which may also be referred to as game on demand, is an online gaming technology based on Cloud computing technology. Cloud gaming technology enables lightweight devices (THIN CLIENT) with relatively limited graphics processing and data computing capabilities to run high quality games. In a cloud game scene, the game is not run in a player game terminal, but is run in a cloud server, the cloud server renders the game scene into a video and audio stream, and the video and audio stream is transmitted to the player game terminal through a network. The method and the device are applied to cloud games, and the routing cost of the corresponding calling path is dynamically updated according to the actual processing condition of each game service node, so that the better routing path is calculated in real time, the routing path with better service quality is conveniently provided for game service, and the game experience of a game player is improved.
In addition, the traffic routing method provided by the application can be applied to the fields of vehicle-mounted and traffic monitoring, for example, the traffic routing method provided by the application can intelligently select a proper traffic routing path for traffic management systems, and the efficiency of law enforcement personnel in handling illegal behaviors is improved while the system is rapidly fed back to operate.
At present, when calculating the preferred routing path, the routing cost of the calling path corresponding to the configuration data assignment of each service node is generally utilized, so that the current preferred routing path is calculated. However, the routing cost of each call path is a fixed value, and the routing cost cannot be updated according to the actual situation of the call path.
Based on this, the present application first provides a weighted round robin routing algorithm. Referring to fig. 1A, a schematic diagram of a weighted round robin routing algorithm according to an exemplary embodiment of the present application is shown. Specifically, the master regulating node calculates the routing cost according to the service quality index returned by the regulated point or the downstream node machine hardware information, and selects the downstream regulated point to call and execute in combination with a polling algorithm. For example, north request 1 (or south request 1) determines a downstream adjusted point according to a polling algorithm, which is routed to a north machine room (or south machine room). The polling method can also be replaced by a random algorithm.
The method can determine the downstream regulated node based on the service quality index returned by the service node. But also has the following problems: different requests for the same service may have different performance consumption, and sometimes requests with higher performance consumption may be randomly concentrated on a few service instances, resulting in higher latency. Meanwhile, in a cold start state, the processing capacity of the instance at the start-up is poor due to the lack of cache data.
Based on the above, the application provides a routing algorithm based on the routing weight of the local link. Specifically, the master node obtains a list (numbered 1-n) of the downstream nodes, calculates the routing cost (which can be obtained based on a plurality of cost calculation indexes) of each node respectively, and then selects one with the minimum routing cost from the nodes numbered 1-n by using a routing algorithm strategy according to the calculated routing cost.
Referring to fig. 1B, a schematic diagram of a routing algorithm based on local link routing costs according to an exemplary embodiment of the present application is shown. The relationship between the throughput and the delay of each adjusted point (including the adjusted point 1 and the adjusted point 2) is shown in the figure, assuming that the adjusted point 2 is selected in the initialization (note that the throughput of the adjusted point 1 cannot be 0, a default minimum value can be set, and is not selected by the following request), as the throughput of the adjusted point 2 increases, the delay is larger and larger, when the throughput is Q2, the delay of the adjusted point 2 is consistent with the delay of the adjusted point 1 when the throughput is Q1 (both are L1), if the flow is continuously distributed to the adjusted point 2, the delay of the adjusted point 2 is gradually larger than the delay of the adjusted point 1, so the flow is distributed to the adjusted point 1, and as the throughput of the adjusted point 1 is larger and larger, the delay is gradually larger than the delay of the adjusted point 2. At this point, the flow is routed to the regulated point 2 again, and so on, the flow is repeatedly and alternately distributed. In the above process, the routing cost of the request only sees the condition of the regulated point of the directly next layer, namely, the regulated point with the minimum routing cost is selected for traffic distribution. The method only focuses on the routing cost of the layer between the current main adjusting point and the adjusted point, and the accuracy of the selection of the preferred routing path can be reduced due to the fact that node selection is not carried out on the total routing cost from the perspective of the whole link.
Based on the method, the application provides a routing algorithm based on the total routing cost sum of all-link view angles. The algorithm is a micro-service flow heuristic intelligent routing method based on N nearest neighbor mechanisms, focuses on complete path search of time-consuming optimization of a network request end-to-end full link, and explores a problem solution of more global view and more optimization. It mainly comprises 2 stages, the first stage is: starting from the initial service node (root node) of the network request, when one regulated point executes the network request, dynamically updating the route cost from the main regulating point to the regulated point in real time, and ensuring that the route cost can reflect the latest quality state of the service network in real time. The second stage is: after receiving the cost updating signals of the main adjusting node and the adjusted point, calculating the total sum of the route costs of all possible paths of the network request end-to-end full link under the current node from the root node, then carrying out ascending arrangement, and reserving N candidate route paths as possible route paths of the current main adjusting node to the downstream adjusted point. And in the next step, repeating the thought of the previous step according to the tail node of each path of the N candidate sets of the previous step until the optimal solution path of the complete link is finally reached. In the application of the billion-level processing request flow routing scene in the field of content processing, the application reduces the failure rate and the flat response of the online service and effectively ensures the service quality (SLA) of a service channel. Meanwhile, the method provided by the application can be popularized to the application of the flow routing scene related to the micro service as a general algorithm mechanism, and solves the problems of high failure rate and high request flat response on-line service quality possibly caused by unreasonable network flow routing of the micro service.
The method provided by the application better solves the problem that the main adjusting point and the adjusted point select the adjusted point based on the local view angle according to the routing cost, and the complete link quality condition of a network request is integrally seen from global, sensitivity, business and the like. When a network request route passes through an adjusted point, the service quality index of the adjusted point is collected in real time, the route cost of each pair of the main adjusting point and the adjusted point is updated in real time, the route cost can be generated through a diversification mechanism, the cost calculation index of a certain dimension can be supported to determine the route cost, such as time consumption and availability, the route cost can also be determined through a multi-feature fusion method, then the route cost is determined according to the updated latest route cost in the network service topology, and meanwhile, the better path from the initial service node to the target service node is dynamically calculated and updated in real time based on N nearest neighbor heuristic algorithms. When the next request comes, traffic routing is performed according to the latest preferred path, so that the preferred traffic distribution of the global view is ensured. Compared with the traditional scheme, the application ensures that the micro-service system can feed back the multi-dimensional network service quality index to the routing cost in real time, and simultaneously completely sees the whole routing cost of one network request from the full-link view, thereby planning the routing path of the network flow more comprehensively, ensuring the online service quality and providing stable service.
It will be appreciated that in the specific embodiment of the present application, related data such as network requests, cost calculation indexes, etc. are involved, and when the above embodiments of the present application are applied to specific products or technologies, the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
The application will be illustrated by the following examples:
Referring to fig. 1C, a schematic architecture diagram of a network request processing system according to an exemplary embodiment of the present application is shown. The network request processing system may specifically include a terminal device 101, a first server 102, and a second server 103. Wherein the terminal device 101, the first server 102 and the second server 103 are connected through a network, for example, a local area network, a wide area network, a mobile internet, etc. The operation object operates on a browser or a client application of the terminal apparatus 101, and generates a corresponding network request (e.g., an access request, a data acquisition request). The server 102 may provide various services related to the network request to the operation object in response to the network request.
In an embodiment, the terminal device 101 may be an initiating object of a network request, the second server 103 may be a service node corresponding to a plurality of services (for example, 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.
Specifically, the terminal device 101 may send the first network request to the first server 102; the first server 102 receives the first network request, and determines an initial service node, a target service node and an intermediate-level service node corresponding to the first network request from a plurality of service nodes included in the second server 103; the first server 102 obtains a first routing path recorded currently, and performs traffic routing for the first network request according to the first routing path (for example, the routing path recorded by the first routing path is a service node corresponding to a service a, a service node corresponding to a service C, a service node corresponding to a service B, and then performs traffic routing for the first network request according to the sequence of the service node corresponding to the service a, the service node corresponding to the service C, and the service node corresponding to the service B); in the process of the traffic routing, the first server 102 obtains a route cost index returned by each service node in the first route path when the traffic routing is executed, recalculates the current route cost of each calling path according to the returned route cost index, and generates a second route path based on the current route cost; when the first server 102 receives the second network request, a second routing path is acquired, and traffic routing is performed on the second network request based on the second routing path.
The Terminal equipment 101 is also referred to as a Terminal, user Equipment (UE), access Terminal, subscriber unit, mobile device, user Terminal, wireless communication device, user agent, or user equipment. The terminal device may be, but is not limited to, a smart home appliance, a handheld device (e.g., a smart phone, a tablet computer) with wireless communication function, a computing device (e.g., a personal computer (personal computer, PC), a vehicle-mounted terminal, a smart voice interaction device, a wearable device, or other smart device, etc.
The server (the first server 102 or the second server 103) may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content distribution network (Content Delivery Network, CDN), and basic cloud computing services such as big data and an artificial intelligence platform.
In one embodiment, the second server 103 (or the first server 102) may be a service server group (the service server group may be one service server or a plurality of service servers, and the service server group may be a combination of a main server and a plurality of edge servers, or may be a combination of a main server, a plurality of intermediate servers, and a plurality of edge servers).
In an embodiment, the architecture of the network request processing system provided by the application may further include a database, where the database may be used to store the routing path at the current time, and may also be used to store related data for calculating the routing path, where the data may be recorded in the database by different database tables. For example, the database may be a database provided in the server, that is, may be a database built in or self-contained in the server; the database may also be a peripheral database connected to the server, for example, a cloud database (i.e., a database deployed in the cloud), and specifically may be deployed based on any one of a private cloud, a public cloud, a hybrid cloud, an edge cloud, and so on, so that the cloud database has different focused functions. For example, the database deployed in the private cloud is a personal device of the user, and is more focused on serving a small part of the user, while the database deployed in the public cloud is deployed based on a cloud platform provided by a third party, so that the data stored in the database can be shared, the data of any user can be stored in the database, and similarly, the data in the database can be used by any user.
It will be understood that the architecture schematic diagram of the system described in the embodiment of the present application is for more clearly describing the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. For example, the network request processing method provided by the embodiment of the present application may be performed by a server or a server cluster different from the first server 102 and capable of communicating with the terminal device 101 and/or the second server 103, in addition to the first server 102. As another example, the method provided by the embodiment of the present application may perform functions such as dynamic update of routing cost, real-time calculation of routing path, etc. by the second server 103, without the need of the first server 102 for managing the terminal device 101 and the second server 103.
Those of ordinary skill in the art will recognize that the number of terminal devices and servers in fig. 1C is merely illustrative. Any number of terminal devices and servers may be configured according to service implementation needs. Moreover, with the evolution of the system architecture and the appearance of new service scenarios, the technical scheme provided by the embodiment of the application is also applicable to similar technical problems. In the subsequent embodiments, the terminal device 101 will be referred to by a terminal device, the first server 102 will be referred to by a management server, and the second server 103 will be referred to by a service node, which will not be described in detail in the subsequent embodiments.
Referring to fig. 2, which is a flowchart illustrating a network request processing method according to an exemplary embodiment of the present application, the method is applied to a management server (refer to the first server 102 in fig. 1C), and the method may include the following steps:
S201, a first network request is received, and an initial service node and a target service node corresponding to the first network request are determined.
In the embodiment of the present application, the first network request is a network request sent by the terminal device to the management server, for example, a data acquisition request, an access request, and the like. When executing the first network request, a plurality of service nodes are required to participate in execution, the plurality of service nodes form a calling relation chain together, and the management server carries out traffic routing by the first network request according to the sequence of each service node in the calling relation chain. The first network request is based on different routing paths to realize traffic routing, however, when the first network request is based on different routing paths, a significant quality difference exists, and the traffic routing is performed based on a worse routing path, so that service quality and use experience can be greatly affected.
In an embodiment, the initial service node may be carried in the first network request, and when the management server obtains the first network request, the management server may determine the corresponding target service node according to the initial service node carried in the first network request; the initial service node may also be a service node selected based on the first network request when the management server acquires the first network request, for example, the first network request is a game data acquisition request, and the target game data are respectively stored in different service servers, so that traffic routing is required. Then, when selecting the originating service node, the management server may determine the originating service node based on the selection rule (e.g., the nearby access rule), and then determine the corresponding target service node based on the originating service node. The method improves the flexibility of selecting the initial service node, and is more convenient for providing more matched data root nodes for service.
S202, acquiring a first route path recorded currently, and carrying out traffic routing on a first network request according to the first route path; the first routing path is a routing path satisfying a path selection rule among a plurality of routing paths from the originating service node to the target service node.
In the embodiment of the application, the path selection rule is associated with the routing cost of each calling path in the routing paths. The first routing path is one routing path determined by the management server according to a path selection rule from a plurality of routing paths from the initial service node to the target service node, specifically, when the first routing path is determined according to the path selection rule, the management server obtains routing costs of each calling path (the calling path refers to a road section between two adjacent service nodes in the routing path, and one calling path comprises a main adjusting node and an adjusted point) in each routing path, and then determines the first routing path according to the routing costs of each calling path in each routing path, so that the routing costs are determined based on each calling path when the routing path is searched, the more accurate obtaining of the better routing path is facilitated, and the reliability of the selection of the better routing path is improved.
In one embodiment, the management server determines a preferred routing path according to the routing cost of each calling path in the currently known routing paths, stores the preferred routing path as a first routing path, and updates the preferred routing path in real time (e.g., updates the first routing path based on the routing cost of each calling path in the updated routing paths every second). When the management server acquires a network request at a certain moment, the stored first routing path updated in real time is acquired again and used for traffic routing of the network request. The first routing path may be a routing path with the smallest total routing cost among a plurality of routing paths from the initial service node to the target service node, or may be a routing path with smaller total routing cost selected according to a path selection rule. The specific implementation manner of the preferred path selection based on the path selection rule will be described in detail in the following embodiments, and will not be described in detail here.
In one embodiment, the initial service node is a first-level service node, the target service node is an Mth-level service node, M-2 intermediate levels are further included between the first level and the Mth level, each intermediate level comprises one or more intermediate service nodes, and M is an integer greater than or equal to 3; a calling path exists between two adjacent service nodes, the calling path connects a main adjusting node and an adjusted point, the main adjusting node is a service node which initiates calling, the adjusted point is a called service node, and the level to which the adjusted point belongs is the next level of the level to which the main adjusting node belongs.
This will be illustrated by fig. 3, in which fig. 3, M is taken as 4 as an example, that is, the starting service node is the first service node, and the target service node is the fourth service node. Referring to fig. 3, the network structure of a multi-level service node provided by the embodiment of the present application includes multi-level service nodes, for example, a first-level service node, a second-level service node, a third-level service node and a fourth-level service node, where two service nodes in two adjacent levels may have a call relationship. The initial service node (ip 00 in the figure) is a first-level service node, and the target service node (ip 07 in the figure) is a fourth-level service node; the originating service node (ip 00) has a call relation with a plurality of intermediate service nodes in the second level service node, such as ip08, ip01 and ip02; ip08 has a calling relationship with ip09 and ip03 in the third-level service node, ip01 has a calling relationship with ip03 and ip04 in the third-level service node, and ip02 has a calling relationship with ip05 and ip06 in the third-level service node; ip09, ip03, ip04, ip05 and ip06 in the third level service node have a call relation with the target service node (ip 07), respectively.
Illustratively, for ip00 and ip08, the connection arrow between ip00 and ip08 is a call path between ip00 and ip08, where ip00 is the master adjustment point and ip08 is the adjusted point. "Cost" between ip00 and ip 02: 1 "means that the routing cost of the call path between ip00 and ip02 is 1.
It should be noted that each of the multi-tier service nodes may process a certain type of service request. The first level service node in the present application is ip00 only for example, in the first level service node, there may be multiple service nodes (for example, ip10, ip20, ip30, for processing different requests under the level), ip10 (or ip20, or ip 30) may also be used as a starting service node, and one (for example, ip19, or ip29, or ip 39) corresponding fourth level service node may also be used as a target service node, where multiple levels of service nodes also exist between the starting service node and the target service node, which will not be described in detail in this embodiment.
S203, acquiring the current routing cost of each calling path in the first routing path; the current routing cost is the routing cost redetermined according to the cost calculation index acquired in the target stage in the flow routing process.
In the embodiment of the application, when the traffic routing is carried out according to the first routing path and aiming at the first network request, the management server can acquire the cost calculation index returned by each main adjustment point in the first routing path when the corresponding adjusted point is called for traffic routing. The cost calculation index returned by the regulated point is determined based on the processing state or node related information of the regulated point when the regulated point carries out traffic routing. The current routing cost of each calling path is redetermined through the cost calculation index obtained in the flow routing process, and the routing cost of the calling path can be dynamically updated, so that a management server calculates a better routing path in real time for a subsequent network request to execute the flow routing, the service quality is ensured, and the use experience is improved.
In an embodiment, the cost calculation index includes one or more of a quality of service index, a resource index and a service attribute index, the quality of service index includes one or more of an error rate, a delay rate, a service availability, a network state, and a response time, the resource index is determined according to the node configuration data, and the service attribute index includes one or more of a network request priority and a network request complexity.
The quality of service index is an index generated by the regulated point based on actual processing conditions when the regulated point processes the network request, and comprises error rate, service availability, network state, response time and the like, and the index can better represent the actual processing capacity of the regulated point. The resource index is determined according to configuration data of the node, such as the processing rate, bandwidth of the regulated point, server resource configuration data of the regulated point, and the like, and the index of the type can better represent the theoretical processing capacity of the regulated point. The service attribute indexes comprise network request priority and network request complexity, the service characteristics such as high-quality traffic and emergency traffic are integrated into the indexes of the type, and the indexes of the type can better characterize the priority of the regulated point when executing certain types of request data so as to facilitate the network request to be routed to the service node which is more matched with the service attribute for execution. The method calculates the current routing cost of each calling path from the service quality index, the resource index and the service attribute index, so that the routing cost can be combined with service characteristics, and the accuracy of calculating the current routing cost is improved by fusing the multidimensional index, so that the better routing path can be calculated in real time. By executing the flow routing through the optimal routing path, the problems of high failure rate and high on-line service quality of flat response request possibly caused by unreasonable network flow routing are reduced, the service quality is ensured, the use experience is improved, and meanwhile, the cost of the flow routing is also reduced.
In one embodiment, the target phase includes at least one of: the main regulation point in the calling path processes the first network request by calling the regulated point, and the processing stage is after the processing result of the first network request is obtained.
When the target phase is the first case (i.e. the phase that the master adjustment point in the call path processes the first network request by calling the adjusted point), the management server may obtain the cost calculation index during the process that any master adjustment point calls the adjusted point to process the first network request. For example, the quality of service index, the resource index and the service attribute index in the cost calculation index may be obtained during the process (including before processing and during processing) that the master adjustment point calls the adjusted point to process the first network request.
When the target stage is the second case (i.e. the processing stage after the processing result of the first network request is obtained), the management server may obtain the cost calculation index according to the processing result after the processing result of the first network request is obtained. For example, the error rate, the delay rate, the service availability and the response time in the service quality index require that the management server process the first network request after the master adjustment point calls the adjusted point (at least including two cases, after the first is that any master adjustment point in the first routing path calls the adjusted point to perform the traffic routing, or after all nodes in the first routing path perform the traffic routing task), statistical analysis is performed according to the current processing result, and finally the service quality index is obtained.
It should be noted that, the quality of service index, the resource index, and the service attribute index may be obtained in the first case or in the second case, and the present application is not limited thereto.
For providers of traffic routing services, it is often desirable to provide different routes for data traffic of objects of different importance levels. For example, it is often desirable to provide faster, higher quality routes for higher priority data traffic associated with important users, or to provide a better experience for applications such as games, video, etc. that require higher demands on the line. The application integrates the service characteristics, improves the matching degree of the routing path and the service, realizes intelligent and differentiated routing path distribution, and further improves the service quality and the use experience.
In an embodiment, since the cost calculation index includes multiple indexes, the cost calculation index is obtained in different manners. The acquisition of the cost calculation index may include two ways: the first is obtained by the management server during the process that the master call point in the call path calls the adjusted point to process the first network request. For example, the resource indicator, the network request priority, the network request complexity, and some real-time processing state data (e.g., a processing rate for a period of time) may be obtained during processing of the first network request by the regulated point. The second type is obtained by the management server after the main adjustment point in the adjustment path calls the adjusted point for the first network request processing. For example, data characterizing the status of the entire process, such as error rate, service availability, network status, response time, etc., may be obtained after the first network request is processed by the regulated point. By the method, flexibility of acquiring the cost calculation index is improved.
In an embodiment, redefining the current routing cost for each call path based on the cost calculation metrics may include two ways: the first is that the management server determines after any one of the master call adjusted points in the call path calls the adjusted point to process the first network request. The second is that the management server determines after the main call regulated point in all call paths in the routing path is completed for the first network request processing.
The two cases described above will be described below based on fig. 3: assuming that the first routing path is [ ip00, ip01, ip03, ip07], in the first case, updating the routing cost of the calling path between ip00 and ip01 immediately after ip00 calls ip01 to finish processing, and storing; updating the routing cost of the calling path between ip01 and ip03 immediately after ip01 calling ip03 processing is completed, and storing; and updating the routing cost of the calling path between the ip03 and the ip07 immediately after the ip03 calling ip07 processing is completed, storing, and finally updating the routing cost of the whole routing path. In the second case, after the service nodes in ip00, ip01, ip03 and ip07 are processed in turn, the routing cost of each calling path in the routing path is updated and stored, and finally the updating of the routing cost of the whole routing path is realized. The method improves the flexibility of obtaining the route cost, and the management server can timely obtain the latest route cost from the stored route cost of each calling path in each route path, so as to calculate the preferred route path in real time and improve the accuracy of calculating the preferred route path.
S204, determining a second routing path meeting the path selection rule from the plurality of routing paths according to the current routing cost, so that when the second network request is received, traffic routing is carried out on the second network request according to the second routing path.
In the embodiment of the application, the current routing cost is the real-time updated routing cost of each calling path determined by the management server according to the cost calculation index acquired in the flow routing process, and the management server determines a second routing path meeting the path selection rule from a plurality of routing paths according to the current routing cost and is used for executing the flow routing by the second network request. Because the second routing path is a better routing path obtained by the management server based on the fusion calculation of the multiple cost calculations, the service quality of the second network request when the traffic routing is executed is ensured, and the use experience is improved.
Wherein the second network request corresponds to the originating service node and the target service node. In an embodiment, the second network request corresponds to an originating service node and a target service node, that is, when the management server obtains the second network request, it may determine, according to information carried in the second network request, only one originating service node among the service nodes included in the first hierarchy, where the originating service node corresponds to only one target service node, and the target service node is one of the service nodes included in the last hierarchy. A plurality of intermediate levels (for example, including a second level and a third level) are included between the first level and the last level, a plurality of second level nodes matched with the second level can be determined from the second level through the initial service node, a plurality of third level nodes matched with each second level node are determined from the third level based on the plurality of second level nodes, each of the plurality of third level nodes is connected with the target service node, and a complete call chain from the initial service node to the target service node through the plurality of intermediate levels is finally formed. It should be noted that, in this embodiment, the number of intermediate levels is 2, and the case that the number of intermediate levels is other values will not be described in detail.
In an embodiment, the management server needs to acquire the latest routing cost of each calling path after a certain network request performs traffic routing, so as to facilitate subsequent real-time calculation of the preferred routing path. However, in the initial state of the node network, there is no routing cost of each calling path, so that a preferred routing path cannot be calculated according to the routing cost in the initial state of the node network. Thus, the routing cost of each call path in the initial state of the node network needs to be assigned, and the initial routing cost assignment method may be assigned according to the resource index of the adjusted point (for example, assigned according to the processing rate, the bandwidth of the adjusted point, the server resource configuration data of the adjusted point, etc.), or assigned according to a random algorithm (that is, randomly assigned to the routing cost within a certain numerical range of each call path). It should be noted that, the above-mentioned initial route cost assignment method should be selected reasonably according to the actual service situation, so as to achieve better processing effect, and the present application does not limit the initial route cost assignment method. The method ensures the quick start in the initial state of the node network and improves the efficiency of calculating the optimal routing cost.
The application can be widely applied to an online system based on a micro-service architecture as a general technical scheme, and has higher requirements on availability such as failure rate, flat response and the like of the system and time-efficient service quality indexes, such as an on-line service such as a content processing center (FIT) system, settlement processing and the like, wherein the FIT is totally called Fiduciary Information, namely entrusting information. From the perspective of prevention, the application can obtain more stable service experience for global planning of the flow route, thereby reducing the labor cost of maintaining the system. For on-line system service quality maintenance, the on-line system service quality maintenance method can be divided into a priori prevention view angle and a posterior compensation view angle, and based on the thought of pre-solving the problem, the problem is avoided through the priori view angle based on a routing algorithm mechanism when the traffic is routed, the service quality is better ensured, and therefore the problem is avoided to be solved by putting manpower into posterior compensation and investigation after the problem occurs.
Based on the embodiment, the application has the following beneficial effects:
When receiving a network request, the application carries out flow routing on the network request according to the first routing path which is better at present, determines the current routing cost of each calling path in the first routing path in the flow routing process, and recalculates the second routing path which is better at present based on the current routing cost so as to carry out flow routing on the subsequent network request according to the second routing path. The method ensures that the routing cost of each calling path is determined based on the path selection rule when the preferred routing path is searched, and the routing cost of the calling path is determined based on the acquired cost calculation index in the flow routing process, so that the calculation of the routing cost can be integrated with the multi-dimensional index characteristics, the preferred routing path can be acquired more accurately, and the reliability of the selection of the preferred routing path is improved. Compared with a fixed route obtained by assigning route cost by using configuration data of a service node, the application can dynamically update the route cost of each calling route after executing the traffic route of the network request, is convenient for a management server to accurately calculate a better route path in real time for the subsequent network request to execute the traffic route, and solves the problem of service quality caused by unreasonable network traffic route, thereby ensuring the service quality and improving the use experience.
The application also provides that the initial service node can be carried in the first network request or can be selected based on the first network request, so that the flexibility of selecting the initial service node is improved, and the method is more convenient for providing more matched data root nodes for service. The cost calculation indexes in the application can comprise the service quality index, the resource index and the service attribute index, and the current routing cost of each calling path is calculated through various cost calculation indexes, so that the routing cost can be integrated with multi-dimensional index characteristics, and the accuracy of calculating the current routing cost is improved. By combining the service characteristics, the matching degree of the routing path and the service is improved, the intelligent and differentiated routing path distribution is realized, and the service quality and the use experience are further improved. The application also provides a method for assigning the routing cost of each calling path in the initial state of the node network according to the resource index of the regulated node or a random algorithm so as to calculate the optimal routing path in the cold start state, ensure the quick start in the initial state of the node network and improve the calculation efficiency of the optimal routing cost.
The application also provides two ways of acquiring the cost calculation index, namely, the main adjustment point is acquired in the process of calling the adjusted point to process the first network request or after the main adjustment point is called to process the first network request, so that the flexibility of acquiring the cost calculation index is improved. Meanwhile, the updating of the current routing cost in the application can also comprise two modes, namely, any main adjustment point is called and is determined after the processing of the first network request is completed by the adjustment point, or the main adjustment point in all the calling paths in the routing path is called and is determined after the processing of the first network request is completed by the adjustment point, so that the flexibility of acquiring the routing cost is improved, and the management server can acquire the latest routing cost from the stored routing costs of all the calling paths in real time, so that the calculation accuracy of the better routing path is improved.
Referring to fig. 4, which is a flowchart illustrating a network request processing method according to an exemplary embodiment of the present application, the method is applied to a management server (refer to the first server 102 in fig. 1C), and the method may include the following steps:
s401, receiving a first network request, and determining an initial service node and a target service node corresponding to the first network request.
S402, acquiring a first route path recorded currently, and carrying out traffic routing on a first network request according to the first route path; the first routing path is a routing path which satisfies a path selection rule in a plurality of routing paths from the initial service node to the target service node, and the path selection rule is associated with the routing cost of each calling path in the routing paths.
S403, acquiring the current routing cost of each calling path in the first routing path; the current routing cost is the routing cost redetermined according to the cost calculation index acquired in the target stage in the flow routing process.
Wherein the target phase comprises at least one of: the main regulation point in the calling path processes the first network request by calling the regulated point, and the processing stage is after the processing result of the first network request is obtained.
In an embodiment, when traffic routing is performed according to the first routing path for the first network request, the management server may obtain a cost calculation index returned by the adjusted points when each master adjustment point in the first routing path invokes the corresponding adjusted point to perform traffic routing. The cost calculation index returned by the regulated point is determined based on the processing state or node related information of the regulated point when the regulated point carries out traffic routing. The current routing cost of each calling path is redetermined through the cost calculation index obtained in the flow routing process, and the routing cost of the calling path can be dynamically updated, so that a management server calculates a better routing path in real time for a subsequent network request to execute the flow routing, the service quality is ensured, and the use experience is improved.
The specific implementation of steps S401 to 4303 is referred to the related descriptions of steps S201 to S203 in the foregoing embodiments, and will not be repeated here. The details of determining the second routing path satisfying the path selection rule from the plurality of routing paths according to the current routing cost in step S204 will be described in detail below through steps S404 to S405.
S404, acquiring a setting parameter N; the setting parameter N is used for indicating the number of call paths selected for the service node when the path is selected.
In the embodiment of the application, the setting parameter N is a positive integer, the setting parameter N is used for indicating the number of the calling paths selected for the service node when the path selection is carried out, when the N takes the maximum value, all possible candidate route paths from the initial service node to the target service node are included when the path selection is carried out, and then the optimal route path with the minimum total route cost is selected from all possible candidate route paths, so that the idea of minimizing the route cost based on the global link is realized, and the selection of the optimal route path is completed; when N is taken to be 1, only one path from the initial service node to the target service node is included in the process of path selection, but when the value of N is 1, a calling path is selected from each service node, one calling path with the minimum routing cost is selected based on the concept of local link routing cost minimization, and the selection of the whole routing path is completed based on the concept. Therefore, the setting parameter N needs to be set according to the actual service condition, so that the selection of the preferred routing path can be finished as much as possible based on the idea of minimizing the global link routing cost, the workload of computing the preferred routing path is reduced, and the efficiency of computing the preferred routing path is improved.
S405, determining a second routing path meeting the path selection rule from the plurality of routing paths according to the setting parameter N, the current routing cost and the historical routing cost of each calling path in the third routing path, so that when the second network request is received, the second network request is routed according to the second routing path.
Wherein the second network request corresponds to the originating service node and the target service node; the third routing path is any routing path except the first routing path in the plurality of routing paths.
In the embodiment of the application, the current routing cost is the routing cost after each calling path in the first routing path is updated after the first network request executes the traffic routing based on the first routing path; the historical route cost of each calling path in the third route path is the route cost of each calling path in other route paths except the first route path, and the management server determines a second route path meeting the route selection rule from the plurality of route paths according to the setting parameter N, the current route cost and the historical route cost, and is used for executing the traffic route by the second network request, so that the second network request executes the traffic route based on the second route path obtained by calculating through the updated route path at the current moment.
In an embodiment, the determining the second routing path that meets the path selection rule from the plurality of routing paths according to the setting parameter N, the current routing cost, and the historical routing cost of each calling path in the third routing path may be implemented according to the following steps.
(A1) And aiming at the first candidate service node, acquiring the routing cost of each calling path corresponding to the first candidate service node from the current routing cost and the historical routing cost of each calling path in the third routing path.
In the embodiment of the present application, the first candidate service node is an initial service node, or is an intermediate service node included in any intermediate hierarchy. When the hierarchy of the first candidate service node is the first hierarchy, the first candidate service node is the initial service node; when the hierarchy of the first candidate service node is the middle hierarchy, the first candidate service node is any one of one or more next-stage candidate service nodes determined by the second candidate service node; the hierarchy to which the first candidate service node belongs is the next level of the hierarchy to which the second candidate service node belongs; the next stage candidate service node is an adjusted node which is arranged on the calling path of the previous X bits and corresponds to the second candidate service node.
The system comprises a first stage service node, a target service node, a first stage service node, a second stage service node, a first stage service node and a second stage service node, wherein the first stage service node is a first stage service node, the target service node is an Mth stage service node, M-2 intermediate layers are arranged between the first stage service node and the Mth stage service node, each intermediate layer comprises one or more intermediate service nodes, and M is an integer greater than or equal to 3; a calling path exists between two adjacent service nodes, the calling path connects a main adjusting node and an adjusted point, the main adjusting node is a service node which initiates calling, the adjusted point is a called service node, and the level to which the adjusted point belongs is the next level of the level to which the main adjusting node belongs.
Referring to fig. 5, a flow chart of a traffic routing process provided by the present application will be described below with reference to the related steps in this embodiment. When the hierarchy of the first candidate service node is the first hierarchy (i.e., the initial service node), the management server first obtains the routing cost of each call path corresponding to the initial service node from the current routing cost and the historical routing cost of each call path in the third routing path (as shown in fig. 5, the initial service node is ip00, the ip00 corresponding call path includes three call paths ip00 to ip08, ip00 to ip01, and ip00 to ip02, the routing cost of the call path of ip00 to ip08 is 4, the routing cost of the call path of ip00 to ip01 is 2, and the routing cost of the call path of ip00 to ip02 is 1).
(A2) According to the setting parameter N and the routing cost of each calling path corresponding to the first candidate service node, selecting the calling path arranged in the front X bits from the calling paths corresponding to the first candidate service node according to the sequence of the routing cost from low to high; and X is determined according to the setting parameter N and the number Y of calling paths corresponding to the first candidate service node.
In an embodiment, the management server determines, from the routing costs of the call paths corresponding to the first candidate service node, a call path of the first X bits with the lowest routing cost that satisfies the setting parameter N. Wherein, X is determined according to the setting parameter N and the number Y of call paths corresponding to the first candidate service node, and the specific determination method of X may be implemented according to the following steps.
(A21) And determining the number Y of the calling paths corresponding to the first candidate service node, and comparing the number Y with the set parameter N.
(A22) And if the comparison result indicates that Y is greater than or equal to N, determining that the value of X is N.
(A23) And if the comparison result indicates that Y is smaller than N, determining that the value of X is Y.
In step (a 21-a 23), the management server may determine the value of X according to the comparison result of the number Y and the setting parameter N. When the number Y of the calling paths is greater than or equal to the set parameter N, the value of X is N, so that when the path selection is carried out on the service node, only N calling paths are selected, the calculated amount of the subsequent calculation of the better routing path is reduced, and the calculation efficiency is improved. When the number Y of the calling paths is smaller than the set parameter N, the value of X is Y, so that all the calling paths corresponding to the service node can be selected, the data quantity of the calling paths is ensured, and the accuracy of calculating the better routing paths subsequently is improved.
The following will describe the above steps based on fig. 5, assuming that the setting parameter N is set to 2, the call paths of the first candidate service node (ip 00) include three call paths ip00 to ip08, ip00 to ip01, and ip00 to ip02, and thus, the number Y of call paths corresponding to ip00 is 3. Comparing the quantity Y with the set parameter N, finding that Y is larger than N, and determining that the value of X is N, namely 2. The management server sorts the total routing cost in the calling paths corresponding to the ip00, selects the calling paths arranged in the front X bits (namely the front 2 bits), and selects the calling paths (the total routing cost is 1) from the ip00 to the ip02 and the calling paths (the total routing cost is 2) from the ip00 to the ip 01.
It should be noted that, in this embodiment, the first candidate service node is taken as an example to describe, when a calling path of the ip00 arranged in front X bits is selected, the total routing cost is the routing cost from the ip00 to a certain service node in the second hierarchy; when continuing to process the call path of the next hierarchy based on ip01 (i.e. selecting the call path of the preceding X bits of a certain service node in the second hierarchy), in this step, the total route cost from the starting service node to pass through a service node in the second hierarchy and then to a service node in the third hierarchy is calculated, for example, when processing the call path of the preceding X bits of ip01, the call path includes ip01 to ip03 and ip01 to ip04, at this time, the total route cost of ip00 passing through ip01 to ip03 is 3, the total route cost of ip00 passing through ip01 to ip04 is 7, and the currently determined call path (including two: ip00 passing through ip01 to ip03, ip00 passing through ip01 to ip 04) is selected based on the total route cost.
(A3) And determining one or more candidate routing paths from the plurality of routing paths according to the calling paths of the X bits arranged in front and corresponding to each first candidate service node, and determining a second routing path from the one or more candidate routing paths.
In the embodiment of the present application, the management server may start from the initial service node by using the method provided in step (a 2), and perform selection of the call path based on the path selection rule, so as to obtain one or more candidate routing paths. The management server then determines a preferred routing path (e.g., the routing path with the smallest total routing cost), i.e., the second routing path, from the one or more candidate routing paths. The method ensures that when a plurality of candidate routing paths are acquired based on the routing rule, the routing path with the minimum total routing cost can be determined from the plurality of candidate routing paths, reduces the calculated amount of the better routing path, ensures the calculation accuracy of the higher better routing path, and further ensures the service quality.
The following will describe the above steps based on fig. 5, assuming that the setting parameter N is set to 2, and determining that the routing path includes [ ip00, ip01], [ ip00, ip02], based on the routing cost of each call path of ip 00; determining that the routing path comprises [ ip00, ip01, ip03], [ ip00, ip01, ip04] based on the routing cost of each calling path of ip 01; determining that the routing path comprises [ ip00, ip02, ip05], [ ip00, ip02, ip06]; determining that the routing path comprises [ ip00, ip01, ip03, ip07] based on the routing cost of each calling path of ip 03; determining that the routing path comprises [ ip00, ip01, ip04, ip07] based on the routing cost of each calling path of ip 04; determining that the routing path comprises [ ip00, ip02, ip05, ip07] based on the routing cost of each calling path of ip 05; and determining that the routing paths comprise [ ip00, ip02, ip06, ip07] based on the routing cost of each calling path of ip06, and finally obtaining four candidate routing paths. The management server then determines a second routing path from the four candidate routing paths.
In an embodiment, when the management server performs calculation of the candidate routing paths, when the calculation of the candidate routing paths reaches any one level, at most, only N candidate routing paths are reserved for calculation of the routing paths of the next level based on the setting parameter N, so that the number of the candidate routing paths of the whole link finally generated is less than or equal to N, the calculation amount of the preferred routing paths is further reduced, and the processing efficiency is improved. The management server may also select at most N call paths for the currently selected service node, so that after selecting the candidate service node of each level, the maximum number of allowed candidate routing paths increases by a multiple of N (e.g. when processing to the second level, the maximum number of allowed candidate routing paths is N, and when processing to the 3 rd level, the maximum number of allowed candidate routing paths is n×n. Any one of the methods can be flexibly selected based on different service conditions, and better processing effect is achieved by balancing processing efficiency and processing result accuracy. This embodiment is not limited thereto.
In an embodiment, the above determination of the second routing path from the one or more candidate routing paths may be implemented according to the following steps.
(B1) And determining the total routing cost of each candidate routing path in one or more candidate routing paths according to the current routing cost and the historical routing cost.
In an embodiment, assuming that the routing paths [ ip00, ip01, ip03, ip07] are first routing paths, after the first network requests to perform traffic routing based on the first routing paths, the routing costs of each calling path in the first routing paths are updated, and the routing costs of each calling path in the updated first routing paths are the current routing costs. The routing cost of the calling paths except the calling path included in the first routing path is the historical routing cost.
(B2) And determining the candidate route path with the minimum total route cost from one or more candidate route paths according to the total route cost of each candidate route path.
(B3) And determining the candidate route path with the minimum total route cost as a second route path.
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 total routing costs corresponding to each of the four candidate paths, which are 4, 8, 6 and 5, respectively. And then selecting a candidate route path with the minimum total route cost, namely [ ip00, ip01, ip03, ip07], as a second route path.
After the management server acquires the second routing path, the management server stores the second routing path. When the second network request is received, traffic routing can be performed on the second network request according to the second routing path, after the traffic routing is performed on the second network request, routing costs of each calling path included in the second routing path are updated, and the updated routing costs of the calling paths are stored (for example, stored in a master node of the corresponding calling path). The management server may calculate the current preferred routing path based on the routing cost of each calling path in each updated routing path at regular intervals (e.g., every second) such that upon receipt of the most up-to-date network request, traffic is routed to the network request based on the current preferred routing path.
The application can be widely applied to an online system based on a micro-service architecture as a general technical scheme, and has higher requirements on availability of system failure rate, flat response and the like and time-efficiency service quality indexes, such as online service of a content processing center station (FIT) system, settlement processing and the like, and can obtain more stable service experience on global planning of flow routing from the view of preventing the occurrence of the failure, thereby reducing the labor cost of maintaining the system. For on-line system service quality maintenance, the on-line system service quality maintenance method can be divided into a priori prevention view angle and a posterior compensation view angle, and based on the thought of pre-solving the problem, the problem is avoided through the priori view angle based on a routing algorithm mechanism when the traffic is routed, the service quality is better ensured, and therefore the problem is avoided to be solved by putting manpower into posterior compensation and investigation after the problem occurs.
Referring to fig. 5, a flow chart of a flow routing process provided by the present application will be described below with reference to fig. 5.
The key difference of the application is that the whole evaluation analysis is carried out on the cost of the whole route link based on the heuristic route searching algorithm, so that a relatively better route is obtained, and the key is the updating of the route cost and the innovation of the route algorithm. In a cold start state, the application can assign the initial routing cost of each calling path to carry out flow routing according to the resource performance of the machine or a random algorithm; after cold start, every time the network request is routed to each regulated point, the regulated point feeds back its own service quality index data (namely cost calculation index) to its main regulating point in real time, and then updates the end-to-end full link preferred path of the network request in real time for the next use.
This embodiment will be described in terms of two aspects of traffic routing, the first aspect being: and dynamically searching for the optimal path planning of the end-to-end full link. The second aspect is: and after the traffic routing is executed, updating the routing cost from the main adjusting point to the corresponding adjusted point in real time. The (5-b) sub-graph in fig. 5 is a schematic diagram of the process flow of the first aspect, and shows the micro-service network topology. The sub-graph (5-a) in fig. 5 is a schematic diagram of the process flow of the second aspect. It should be noted that, in the (5-a) sub-graph in fig. 5, there are two ip00 with different colors, where the two ip00 with different colors are the same service node, and the labels with different colors are only for distinguishing different routing paths. The two different colors ip07 are the same in this figure, and this embodiment will not be described again.
Wherein n=2 is selected for N of the N nearest neighbor algorithms on which the present application is based. Storing information at each master adjustment point may include: the routing cost (mainly composed of cost function) of the master node and each downstream regulated node, and the current preferred downstream regulated node of the master node of each hierarchy.
Specifically, the first aspect may include the following steps:
Step 1: since the downstream regulated points of ip00 have ip08, ip01 and ip02, the routing cost between ip00 and ip08 is 4, the routing cost between ip00 and ip01 is 2, the routing cost between ip00 and ip02 is 1, and n=2, top2 is reserved, and ip01 and ip02 with smaller routing cost are selected as routing branches of the network request. Therefore, the current preferred path candidates are:
(1)、[ip00、ip01]。
(2)、[ip00、ip02]。
Step 2: based on step 1, the tail nodes of the current preferred route candidate are ip01 and ip02, and at this time, the candidate route of the next step may be: [ ip00, ip01, ip03], [ ip00, ip01, ip04], [ ip00, ip02, ip05] and [ ip00, ip02, ip06]. Calculating the sum of the costs of the candidate route paths, namely 3, 7, 5 and 4 respectively, and then arranging the candidate route paths in a descending order, wherein the current preferred candidate route is obtained by reserving top2 because N=2:
(1)、[ip00、ip01、ip03]。
(2)、[ip00、ip02、ip06]。
Step 3: based on step 2, the tail nodes of the current preferred candidate paths are ip03 and ip06, and at this time, the candidate routing paths in the next step may be: [ ip00, ip01, ip03, ip07], [ ip00, ip02, ip06, ip07], respectively calculating the route cost sum of each candidate route path, which is respectively 4 and 5, and then arranging in descending order, wherein n=2, and leaving top2 to obtain the current preferred candidate route path as follows:
(1)、[ip00、ip01、ip03、ip07]。
(2)、[ip00、ip02、ip06、ip07]。
Step 4: and (3) after reaching the end-to-end tail node (target service node), sequencing the route cost sum of each candidate route path to obtain top1, and obtaining a better route path: [ ip00, ip01, ip03, ip07], the routing cost sum is 1+2+1=4.
It should be noted that, if the service node with the smallest routing cost is selected as the adjusted node at each path selection, a routing path (i.e., [ ip00, ip02, ip06, ip07 ]) formed by the nodes with diagonal patterns in the (5-b) sub-graph in fig. 5 is obtained, and obviously, from the global perspective, the routing path is not a more optimal routing path.
Step 5: and (3) executing a network request based on the preferred routing path obtained in the step (4), updating the latest routing cost of each calling path in the preferred routing path in the step (4) after the network request is executed, storing the latest routing cost into ip00, ip01 and ip03, jumping to the step (1), and recalculating the current preferred routing path according to the latest routing cost at fixed time. When a new network request comes later, the traffic route of the request is executed based on the recalculated current preferred route path, and the latest route cost of each calling path in the preferred route path is updated again after the network request is executed, and is saved, so that the automatic cycle optimization is performed.
In the step 1-5 provided in the first aspect, when the management server performs calculation of the candidate routing paths, when the candidate routing paths reach any one level, based on the setting parameter N, only N candidate routing paths are reserved at most for the processing procedure under the condition of calculation of the routing paths of the next level, so that the number of the candidate routing paths of the whole link finally generated is less than or equal to N, thereby reducing the calculation amount of the better routing paths and improving the processing efficiency. In an embodiment, the management server may also select a maximum of N call paths for each currently selected service node, so that after selecting the candidate service node of each level, the maximum number of allowed candidate routing paths increases by a multiple of N. Compared with the first method, the method can improve the data quantity to a certain extent, thereby improving the accuracy of calculation of the better routing path. Any one of the methods can be flexibly selected based on different service conditions, and better processing effect is achieved by balancing processing efficiency and processing result accuracy.
Based on this, the above-mentioned first aspect may also be realized by the following steps:
Step 1: since the downstream regulated points of ip00 have ip08, ip01 and ip02, the routing cost between ip00 and ip08 is 4, the routing cost between ip00 and ip01 is 2, the routing cost between ip00 and ip02 is 1, and n=2, top2 is reserved, and ip01 and ip02 with smaller routing cost are selected as routing branches of the network request. Therefore, the current preferred path candidates are:
(1)、[ip00、ip01]。
(2)、[ip00、ip02]。
Step 2: based on step 1, the tail nodes of the current preferred route candidate are ip01 and ip02, and at this time, the candidate route of the next step may be: [ ip00, ip01, ip03], [ ip00, ip01, ip04], [ ip00, ip02, ip05] and [ ip00, ip02, ip06]. The above-mentioned candidate route path cost sums are calculated respectively, and are 3, 7, 5 and 4 respectively, and then arranged in descending order, because n=2 (where N limits the maximum number of call paths that any one service node can choose), and ip01 and ip02 each correspond to two callable service nodes (ip 01 corresponds to ip03 and ip04, and ip02 corresponds to ip05 and ip 06). Thus, the current preferred candidate path is obtained as:
(1)、[ip00、ip01、ip03]。
(2)、[ip00、ip01、ip04]。
(3)、[ip00、ip02、ip05]。
(4)、[ip00、ip02、ip06]。
Step 3: based on step 2, the tail nodes of the current preferred candidate paths are ip03, ip04, ip05 and ip06, and at this time, the candidate routing paths in the next step may be: [ ip00, ip01, ip03, ip07], [ ip00, ip01, ip04, ip07], [ ip00, ip02, ip05, ip07], [ ip00, ip02, ip06, ip07], respectively, calculate the route cost sum of each candidate route path, respectively, 4, 8, 6, and 5, and then arrange in descending order, because n=2 (where N limits the maximum number of call paths that any service node can choose), and ip03, ip04, ip05, and ip06 each correspond to only one service node that can be called (ip 03 corresponds to ip07, ip04 corresponds to ip07, ip05 corresponds to ip07, ip06 corresponds to ip 07). Thus, the current preferred candidate path is obtained as:
(1)、[ip00、ip01、ip03、ip07]。
(2)、[ip00、ip01、ip04、ip07]。
(3)、[ip00、ip02、ip05、ip07]。
(4)、[ip00、ip02、ip06、ip07]。
Step 4: and (3) after reaching the end-to-end tail node (target service node), sequencing the route cost sum of each candidate route path to obtain top1, and obtaining a better route path: [ ip00, ip01, ip03, ip07], the routing cost sum is 1+2+1=4.
It should be noted that, after the candidate service node of each level is selected, the maximum number of allowed candidate routing paths is increased by a factor of N (for example, when the candidate routing paths are processed to the second level, the maximum number of allowed candidate routing paths is N, when the candidate routing paths are processed to the 3 rd level, the maximum number of allowed candidate routing paths is n×n, and so on), compared with the first method, the number of selected routing paths is increased to a certain extent.
Step 5: and (3) executing a network request based on the preferred routing path obtained in the step (4), updating the latest routing cost of each calling path in the preferred routing path in the step (4) after the network request is executed, storing the latest routing cost into ip00, ip01 and ip03, jumping to the step (1), and recalculating the current preferred routing path according to the latest routing cost at fixed time. When a new network request comes later, the traffic route of the request is executed based on the recalculated current preferred route path, and the latest route cost of each calling path in the preferred route path is updated again after the network request is executed, and is saved, so that the automatic cycle optimization is performed.
The routing cost of updating the master node to the corresponding adjusted node in real time after the traffic routing is executed in the second aspect will be described below. Specifically, the second aspect may include the following steps:
step 1: a preferred downstream adjusted point is determined in the preferred routing path.
Step 2: the call is preferably made to the downstream regulated point to execute the network request.
Step 3: and returning a cost calculation index according to the execution information, and updating the routing cost of the adjusted node and the main adjusting node based on the cost calculation index. It should be noted that, here, the customization mechanism may be to calculate the index update routing cost according to the cost of a certain dimension alone, such as the error rate. The route cost can be integrated and updated according to cost calculation indexes of multiple dimensions, and the calculation logic is as follows:
cost (ip (n), ip (n+1))=func (quality of service index, resource index, traffic attribute index)
Where ip (n) is the nth service node, cost (ip (n), ip (n+1)) is the routing cost between the nth service node and the n+1th service node, and func () is the routing cost calculation function. The quality of service indicator may include one or more of error rate, delay rate, service availability, network status, response time, failure rate, the resource indicator being determined from the node configuration data, the traffic attribute indicator including one or more of network request priority, network request complexity. Illustratively, the lower the error rate of an adjusted node, the lower the delay rate, the shorter the response time, and the lower the routing cost of the adjusted node to the corresponding home adjustment node.
In an embodiment, when the master adjustment node invokes the adjusted point to execute the network request, the management server may obtain the original values corresponding to the cost calculation indexes from the adjusted point, then perform preprocessing on the original values corresponding to the cost calculation indexes (for example, perform normalization processing on the original values to uniformly map the data to the [0,1] interval, and perform normalization processing on the original values to scale the data to fall into a specific interval), and then add the preprocessed data corresponding to the cost calculation indexes to serve as the routing cost fused by the cost calculation indexes of the adjusted point. The method can remove unit limitation of each index, convert the unit limitation into dimensionless pure numerical values, and eliminate numerical difference between different indexes, thereby ensuring calculation accuracy of routing cost.
The quality of service index is an index generated by the regulated point based on actual processing conditions when the regulated point processes the network request, and comprises error rate, service availability, network state, response time and the like, and the index can better represent the actual processing capacity of the regulated point. The resource index is determined according to configuration data of the node, such as the processing rate, bandwidth of the regulated point, server resource configuration data of the regulated point, and the like, and the index of the type can better represent the theoretical processing capacity of the regulated point.
The service attribute indexes comprise network request priority and network request complexity, the service characteristics such as high-quality traffic and emergency traffic are integrated into the indexes of the type, and the indexes of the type can better characterize the priority of the regulated point when executing certain types of request data so as to facilitate the network request to be routed to the service node which is more matched with the service attribute for execution. The method calculates the current routing cost of each calling path from the service quality index, the resource index and the service attribute index, so that the routing cost can be combined with service characteristics, and the accuracy of calculating the current routing cost is improved by fusing the multidimensional index, so that the better routing path can be calculated in real time. By executing the flow routing through the optimal routing path, the problems of high failure rate and high on-line service quality of flat response request possibly caused by unreasonable network flow routing are reduced, the service quality is ensured, the use experience is improved, and meanwhile, the cost of the flow routing is also reduced.
For providers of traffic routing services, it is often desirable to provide different routes for data traffic of objects of different importance levels. For example, it is often desirable to provide faster, higher quality routes for higher priority data traffic associated with important users, or to provide a better experience for applications such as games, video, etc. that require higher demands on the line. The application integrates the service characteristics, improves the matching degree of the routing path and the service, realizes intelligent and differentiated routing path distribution, and further improves the service quality and the use experience.
In the sub-graph (5-b) of fig. 5, the routing path formed by the black service node is the preferred routing path calculated by the method of the present application, i.e. [ ip00, ip01, ip03, ip07]. As shown in (5-a) of fig. 5, the diagram is illustrated by using ip00 to call ip01 to execute a network request as an example, step 1, firstly, obtaining a preferred downstream regulated point ip01 in a preferred routing path; step 2, calling ip01 to execute a network request; and 3, returning a cost calculation index according to the execution information of the ip01, and updating the routing cost from the ip00 to the ip01 based on the cost calculation index. It should be noted that, after any network request executes the traffic routing based on the preferred routing path, each calling path in the preferred routing path may implement updating of the routing cost based on the above method, which is not described in detail in this embodiment.
The technical scheme of the application has the following beneficial effects:
(1) Global: from the view point of the routing cost of the end-to-end full link, a larger range of searching for a better flow routing path is realized, the problem that the current main flow algorithm 'only looks at one step' can obtain a local better solution is solved, better flat sound and lower service failure rate can be brought, and the method is suitable for all micro-service flow routing scenes.
(2) Sensitivity: after the regulated point executes the traffic routing task, the service quality index of the node is returned to the main regulating point in real time, and simultaneously, the searching and updating of the better routing path of the end-to-end full link are triggered in real time, the service quality change of the network system is perceived in high sensitivity and real time, and the service quality change is fed back to the next network request for traffic routing.
(3) Business: besides the service quality index and the resource index, the application can integrate the service attribute index, such as high-quality traffic, urgent traffic and the like, in the routing weight model or the routing cost model, and can route the network request to better service nodes for execution according to a routing algorithm.
(4) Experience: because the application is in the phase of problem prevention and eliminates the problem, but the problem is repaired by using the compensation mechanism after the problem occurs, the application is equivalent to that the object can not be perceived at all, thereby guaranteeing the use experience of the object.
Based on the embodiment, the application has the following beneficial effects: the application puts forward that the setting parameter N limits the quantity of the calling paths selected by the service nodes when the paths are selected, and sets the setting parameter N according to the actual service condition, so that the selection of the preferred routing paths is finished as much as possible based on the idea of minimizing the global link routing cost, the workload of computing the preferred routing paths is reduced, and the computing efficiency of the preferred routing paths is improved.
The application also provides that the management server can determine the value of X according to the comparison result of the quantity Y and the set parameter N. When the number Y of the calling paths is greater than or equal to the set parameter N, the value of X is N, so that when the path selection is carried out on the service node, only N calling paths are selected, the calculated amount of the subsequent calculation of the better routing path is reduced, and the calculation efficiency is improved. When the number Y of the calling paths is smaller than the set parameter N, the value of X is Y, so that all the calling paths corresponding to the service node can be selected, the data quantity of the calling paths is ensured, and the accuracy of calculating the better routing paths subsequently is improved.
The application also provides that the calling path is selected based on the path selection rule from the initial service node, so that one or more candidate routing paths are obtained. The management server determines the preferred route path from one or more candidate route paths, so that when the plurality of candidate route paths are acquired based on the route selection rule, the route path with the minimum total route cost can be determined, the calculation amount of the preferred route path is reduced, the calculation accuracy of the preferred route path is ensured, and the service quality is further ensured.
The application also provides that when the candidate route path calculation is carried out and any one level is processed, at most, N candidate route paths are reserved for calculation of the route paths of the next level based on the set parameter N, so that the number of the candidate route paths of the whole link finally generated is less than or equal to N, the calculated amount of the better route paths is further reduced, and the processing efficiency is improved. And selecting at most N calling paths for the currently selected service node, so that the maximum number of the allowed candidate routing paths is increased by a multiple of N after the candidate service node of each level is selected, the data volume is improved to a certain extent, and the calculation accuracy of the better routing paths is improved. The better processing effect is achieved by balancing the processing efficiency and the accuracy of the processing result. Compared with the traditional scheme, the application ensures that the micro-service system can feed back the multi-dimensional network service quality index to the routing cost in real time, and simultaneously completely sees the whole routing cost of one network request from the full-link view, thereby planning the routing path of the network flow more comprehensively, ensuring the online service quality and providing stable service.
Referring to fig. 6, a schematic block diagram of a network request processing apparatus according to an embodiment of the present application is shown. The network request processing device specifically may include:
a data acquisition module 601, configured to receive a first network request, and determine an initial service node and a target service node corresponding to the first network request;
A traffic routing module 602, configured to obtain a first currently recorded routing path, and route traffic according to the first routing path for the first network request; the first routing path is a routing path meeting a routing rule in a plurality of routing paths from the initial service node to the target service node, and the routing rule is associated with routing cost of each calling path in the routing paths;
A calculating module 603, configured to obtain a current routing cost of each calling path in the first routing path; the current route cost is a route cost redetermined according to a cost calculation index acquired by a target stage in the flow routing process, wherein the target stage comprises at least one of the following: a step of processing the first network request by calling the regulated point by the main regulation point in the calling path, and a processing step after the processing result of the first network request is obtained;
The calculating module 603 is further configured to determine, according to the current routing cost, a second routing path that meets the path selection rule from the plurality of routing paths, so that when a second network request is received, traffic routing is performed on the second network request according to the second routing path; the second network request corresponds to the originating service node and the target service node.
Optionally, the calculating module 603 is configured to, when determining, according to the current routing cost, a second routing path that meets the path selection rule from the plurality of routing paths, specifically:
Acquiring a setting parameter N; the setting parameter N is used for indicating the number of the selected calling paths for the service node when the path is selected, and N is a positive integer;
determining a second routing path meeting the path selection rule from the plurality of routing paths according to the setting parameter N, the current routing cost and the historical routing cost of each calling path in the third routing path; the third routing path is any one routing path except the first routing path among the plurality of routing paths.
Optionally, the initial service node is a first-stage service node, the target service node is an mth-stage service node, M-2 intermediate levels are further included between the first stage and the mth stage, each intermediate level includes one or more intermediate service nodes, and M is an integer greater than or equal to 3; a calling path exists between two adjacent service nodes, the calling path connects a main adjusting node and an adjusted point, the main adjusting node is a service node which initiates calling, the adjusted point is a called service node, and the level to which the adjusted point belongs is the next level of the level to which the main adjusting node belongs.
Optionally, the calculating module 603 is configured to, when determining, according to the setting parameter N, the current routing cost, and the historical routing cost of each calling path in the third routing paths, a second routing path that meets the path selection rule from the plurality of routing paths, specifically:
aiming at a first candidate service node, obtaining the routing cost of each calling path corresponding to the first candidate service node from the current routing cost and the historical routing cost of each calling path in the third routing path;
According to the setting parameter N and the routing cost of each calling path corresponding to the first candidate service node, selecting a calling path arranged in front X bits from the calling paths corresponding to the first candidate service node according to the sequence of the routing cost from low to high; x is determined according to a set parameter N and the number Y of calling paths corresponding to the first candidate service node, wherein Y is a positive integer;
determining one or more candidate routing paths from the plurality of routing paths according to the calling paths of the X-bit row corresponding to each first candidate service node, and determining a second routing path from the one or more candidate routing paths;
Wherein the first candidate service node is the initial service node or an intermediate service node included in any intermediate level; when the hierarchy of the first candidate service node is an intermediate hierarchy, the first candidate service node is any one of one or more next-stage candidate service nodes determined for the second candidate service node; the level to which the first candidate service node belongs is the next level to the level to which the second candidate service node belongs; the next-stage candidate service node is an adjusted node which is arranged on the calling path of the previous X bits and corresponds to the second candidate service node.
Optionally, the calculating module 603 is specifically configured to, when configured to determine the second routing path from the one or more candidate routing paths:
Determining the total routing cost of each candidate routing path in the one or more candidate routing paths according to the current routing cost and the historical routing cost;
determining a candidate route path with the minimum total route cost from the one or more candidate route paths according to the total route cost of each candidate route path;
and determining the candidate route path with the minimum total route cost as a second route path.
Optionally, the computing module 603 is further configured to:
determining the number Y of calling paths corresponding to the first candidate service node, and comparing the number Y with the set parameter N;
if the comparison result indicates that Y is greater than or equal to N, determining that the value of X is N;
and if the comparison result indicates that Y is smaller than N, determining that the value of X is Y.
Optionally, the cost calculation index includes one or more of a quality of service index, a resource index and a service attribute index, the quality of service index includes one or more of an error rate, a delay rate, a service availability, a network state and a response time, the resource index is determined according to the node configuration data, and the service attribute index includes one or more of a network request priority and a network request complexity.
Based on the network request processing device, the application carries out flow routing on the network request according to the first route path which is better at present when receiving the network request, determines the current route cost of each calling path in the first route path in the flow routing process, and recalculates the second route path which is better at present based on the current route cost so as to carry out flow routing on the subsequent network request according to the second route path.
The method ensures that the routing cost of each calling path is determined based on the path selection rule when the preferred routing path is searched, and the routing cost of the calling path is determined based on the acquired cost calculation index in the flow routing process, so that the calculation of the routing cost can be integrated with the multi-dimensional index characteristics, the preferred routing path can be acquired more accurately, and the reliability of the selection of the preferred routing path is improved.
Compared with a fixed routing path obtained by utilizing configuration data of a service node to assign routing cost, the method and the device can dynamically update the routing cost of each calling path after executing the traffic routing of the network request, so as to calculate the preferred routing path accurately and in real time, and solve the service quality problem caused by unreasonable network traffic routing.
It should be noted that, the functions of each functional module of the network request processing apparatus according to the embodiment of the present application may be specifically implemented according to the method in the embodiment of the method, and the specific implementation process may refer to the related description of the embodiment of the method, which is not repeated herein.
Referring to fig. 7, a schematic block diagram of a computer device according to an embodiment of the present application is shown. The intelligent terminal in this embodiment as shown in the figure may include: a processor 701, a storage device 702, and a communication interface 703. Data interaction may take place between the processor 701, the storage device 702 and the communication interface 703.
The storage 702 may include volatile memory (RAM), such as random-access memory (RAM); the storage 702 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid state disk (SSD-STATE DRIVE), etc.; the storage 702 may also include a combination of the types of memory described above.
The processor 701 may be a central processing unit (central processing unit, CPU). In one embodiment, the processor 701 may also be a graphics processor (Graphics Processing Unit, GPU). The processor 701 described above may also be a combination of a CPU and a GPU. In one embodiment, the storage device 702 is configured to store program instructions, and the processor 701 may call the program instructions to perform the following operations:
Receiving a first network request, and determining an initial service node and a target service node corresponding to the first network request;
Acquiring a first route path recorded currently, and carrying out traffic routing on the first network request according to the first route path; the first routing path is a routing path meeting a routing rule in a plurality of routing paths from the initial service node to the target service node, and the routing rule is associated with routing cost of each calling path in the routing paths;
acquiring the current routing cost of each calling path in the first routing path; the current route cost is a route cost redetermined according to a cost calculation index acquired by a target stage in the flow routing process, wherein the target stage comprises at least one of the following: a step of processing the first network request by calling the regulated point by the main regulation point in the calling path, and a processing step after the processing result of the first network request is obtained;
determining a second routing path meeting the path selection rule from the plurality of routing paths according to the current routing cost, so that when a second network request is received, traffic routing is performed on the second network request according to the second routing path; the second network request corresponds to the originating service node and the target service node.
Optionally, when the processor 701 is configured to determine, according to the current routing cost, a second routing path that meets the path selection rule from the plurality of routing paths, the processor is specifically configured to:
Acquiring a setting parameter N; the setting parameter N is used for indicating the number of the selected calling paths for the service node when the path is selected, and N is a positive integer;
determining a second routing path meeting the path selection rule from the plurality of routing paths according to the setting parameter N, the current routing cost and the historical routing cost of each calling path in the third routing path; the third routing path is any one routing path except the first routing path among the plurality of routing paths.
Optionally, the initial service node is a first-stage service node, the target service node is an mth-stage service node, M-2 intermediate levels are further included between the first stage and the mth stage, each intermediate level includes one or more intermediate service nodes, and M is an integer greater than or equal to 3; a calling path exists between two adjacent service nodes, the calling path connects a main adjusting node and an adjusted point, the main adjusting node is a service node which initiates calling, the adjusted point is a called service node, and the level to which the adjusted point belongs is the next level of the level to which the main adjusting node belongs.
Optionally, when the processor 701 is configured to determine, according to the setting parameter N, the current routing cost, and the historical routing cost of each calling path in the third routing paths, a second routing path that meets the path selection rule from the plurality of routing paths, the processor is specifically configured to:
aiming at a first candidate service node, obtaining the routing cost of each calling path corresponding to the first candidate service node from the current routing cost and the historical routing cost of each calling path in the third routing path;
According to the setting parameter N and the routing cost of each calling path corresponding to the first candidate service node, selecting a calling path arranged in front X bits from the calling paths corresponding to the first candidate service node according to the sequence of the routing cost from low to high; x is determined according to a set parameter N and the number Y of calling paths corresponding to the first candidate service node, wherein Y is a positive integer;
determining one or more candidate routing paths from the plurality of routing paths according to the calling paths of the X-bit row corresponding to each first candidate service node, and determining a second routing path from the one or more candidate routing paths;
Wherein the first candidate service node is the initial service node or an intermediate service node included in any intermediate level; when the hierarchy of the first candidate service node is an intermediate hierarchy, the first candidate service node is any one of one or more next-stage candidate service nodes determined for the second candidate service node; the level to which the first candidate service node belongs is the next level to the level to which the second candidate service node belongs; the next-stage candidate service node is an adjusted node which is arranged on the calling path of the previous X bits and corresponds to the second candidate service node.
Optionally, the processor 701 is specifically configured to, when configured to determine the second routing path from the one or more candidate routing paths:
Determining the total routing cost of each candidate routing path in the one or more candidate routing paths according to the current routing cost and the historical routing cost;
determining a candidate route path with the minimum total route cost from the one or more candidate route paths according to the total route cost of each candidate route path;
and determining the candidate route path with the minimum total route cost as a second route path.
Optionally, the processor 701 is further configured to:
determining the number Y of calling paths corresponding to the first candidate service node, and comparing the number Y with the set parameter N;
if the comparison result indicates that Y is greater than or equal to N, determining that the value of X is N;
and if the comparison result indicates that Y is smaller than N, determining that the value of X is Y.
Optionally, the cost calculation index includes one or more of a quality of service index, a resource index and a service attribute index, the quality of service index includes one or more of an error rate, a delay rate, a service availability, a network state and a response time, the resource index is determined according to the node configuration data, and the service attribute index includes one or more of a network request priority and a network request complexity.
Based on the network request processing device, the application carries out flow routing on the network request according to the first route path which is better at present when receiving the network request, determines the current route cost of each calling path in the first route path in the flow routing process, and recalculates the second route path which is better at present based on the current route cost so as to carry out flow routing on the subsequent network request according to the second route path.
The method ensures that the routing cost of each calling path is determined based on the path selection rule when the preferred routing path is searched, and the routing cost of the calling path is determined based on the acquired cost calculation index in the flow routing process, so that the calculation of the routing cost can be integrated with the multi-dimensional index characteristics, the preferred routing path can be acquired more accurately, and the reliability of the selection of the preferred routing path is improved.
Compared with a fixed routing path obtained by utilizing configuration data of a service node to assign routing cost, the method and the device can dynamically update the routing cost of each calling path after executing the traffic routing of the network request, so as to calculate the preferred routing path accurately and in real time, and solve the service quality problem caused by unreasonable network traffic routing.
In specific implementation, the processor 701, the storage 702 and the communication interface 703 described in the embodiments of the present application may perform the implementation described in the related embodiments of the network request processing method provided in fig. 2 or fig. 5, or may perform the implementation described in the related embodiments of the network request processing device provided in fig. 6, which are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus and system may be implemented in other manners. For example, the device embodiments described above are merely illustrative; for example, the above units are only one logic function division, and there may be another division manner when actually implemented; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer readable storage medium, in which a computer program executed by the aforementioned network request processing device is stored, and the computer program includes program instructions, when executed by a processor, can execute the method in the embodiment corresponding to fig. 2 and fig. 4, and therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application. As an example, the program instructions may be deployed on one computer device or executed on multiple computer devices at one site or distributed across multiple sites and interconnected by a communication network, where the multiple computer devices distributed across multiple sites and interconnected by a communication network may constitute a blockchain system.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device can execute the method in the embodiment corresponding to fig. 2 and fig. 4, and therefore, a detailed description will not be given here.
Those skilled in the art will appreciate that implementing all or part of the above-described embodiment methods may be accomplished by way of a computer program for instructing relevant hardware, where the program may be stored on a computer readable storage medium, and where the program, when executed, may comprise the embodiment flow of the above-described methods. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), or the like.
The above disclosure is only a few examples of the present application, and it is not intended to limit the scope of the present application, but it is understood by those skilled in the art that all or a part of the above embodiments may be implemented and equivalents thereof may be modified according to the scope of the present application.

Claims (11)

1. A method for processing a network request, the method comprising:
Receiving a first network request, and determining an initial service node and a target service node corresponding to the first network request;
Acquiring a first route path recorded currently, and carrying out traffic routing on the first network request according to the first route path; the first routing path is a routing path meeting a routing rule in a plurality of routing paths from the initial service node to the target service node, and the routing rule is associated with routing cost of each calling path in the routing paths;
Acquiring the current routing cost of each calling path in the first routing path; the current route cost is a route cost redetermined according to a cost calculation index acquired by a target stage in the flow routing process, wherein the target stage comprises at least one of the following: a stage of processing the first network request by calling the regulated point at the main regulation point in the calling path, and a processing stage after a processing result of the first network request is obtained;
Determining a second routing path meeting the path selection rule from the plurality of routing paths according to the current routing cost, so that when a second network request is received, traffic routing is carried out on the second network request according to the second routing path; the second network request corresponds to the originating service node and the target service node.
2. The method of claim 1, wherein the determining a second routing path from the plurality of routing paths that satisfies the path selection rule based on the current routing cost comprises:
Acquiring a setting parameter N; the setting parameter N is used for indicating the number of the call paths selected by the service node when the paths are selected, and N is a positive integer;
Determining a second routing path meeting the path selection rule from the plurality of routing paths according to the setting parameter N, the current routing cost and the historical routing cost of each calling path in the third routing path; the third routing path is any one routing path except the first routing path in the plurality of routing paths.
3. The method of claim 2, wherein the originating service node is a first level service node, the target service node is an mth level service node, M-2 intermediate levels are further included between the first level and the mth level, each intermediate level includes one or more intermediate service nodes, and M is an integer greater than or equal to 3; a calling path exists between two adjacent service nodes, the calling path connects a main adjusting node and an adjusted point, the main adjusting node is a service node which initiates calling, the adjusted point is a called service node, and the level to which the adjusted point belongs is the next level of the level to which the main adjusting node belongs.
4. The method of claim 3, wherein the determining a second routing path from the plurality of routing paths that satisfies the path selection rule based on the setting parameter N, the current routing cost, and historical routing costs for each of the third routing paths comprises:
Aiming at a first candidate service node, acquiring the routing cost of each calling path corresponding to the first candidate service node from the current routing cost and the historical routing cost of each calling path in a third routing path;
According to the setting parameter N and the routing cost of each calling path corresponding to the first candidate service node, selecting a calling path arranged in front X bits from the calling paths corresponding to the first candidate service node according to the sequence of the routing cost from low to high; x is determined according to a set parameter N and the number Y of calling paths corresponding to the first candidate service node, wherein Y is a positive integer;
Determining one or more candidate routing paths from the plurality of routing paths according to the calling paths of the X-bit row corresponding to each first candidate service node, and determining a second routing path from the one or more candidate routing paths;
Wherein the first candidate service node is the initial service node or an intermediate service node included in any intermediate hierarchy; when the hierarchy of the first candidate service node is an intermediate hierarchy, the first candidate service node is any one of one or more next-stage candidate service nodes determined for a second candidate service node; the hierarchy to which the first candidate service node belongs is the next level of the hierarchy to which the second candidate service node belongs; the next-stage candidate service node is an adjusted node which is arranged on the calling path of the previous X bits and corresponds to the second candidate service node.
5. The method of claim 4, wherein the determining a second routing path from the one or more candidate routing paths comprises:
Determining the total routing cost of each candidate routing path in the one or more candidate routing paths according to the current routing cost and the historical routing cost;
determining a candidate route path with the minimum total route cost from the one or more candidate route paths according to the total route cost of each candidate route path;
And determining the candidate route path with the minimum total route cost as a second route path.
6. The method according to claim 4 or 5, characterized in that the method further comprises:
Determining the number Y of calling paths corresponding to the first candidate service node, and comparing the number Y with the set parameter N;
if the comparison result indicates that Y is greater than or equal to N, determining that the value of X is N;
and if the comparison result indicates that Y is smaller than N, determining that the value of X is Y.
7. The method of any of claims 1-5, wherein the cost calculation metrics include one or more of a quality of service metric including one or more of error rate, delay rate, service availability, network status, response time, a resource metric determined from node configuration data, and a traffic attribute metric including one or more of network request priority, network request complexity.
8. A network request processing apparatus, the apparatus comprising:
the data acquisition module is used for receiving a first network request and determining an initial service node and a target service node corresponding to the first network request;
The traffic routing module is used for acquiring a first routing path recorded currently and routing traffic according to the first routing path aiming at the first network request; the first routing path is a routing path meeting a routing rule in a plurality of routing paths from the initial service node to the target service node, and the routing rule is associated with routing cost of each calling path in the routing paths;
The calculation module is used for acquiring the current routing cost of each calling path in the first routing path; the current route cost is a route cost redetermined according to a cost calculation index acquired by a target stage in the flow routing process, wherein the target stage comprises at least one of the following: a stage of processing the first network request by calling the regulated point at the main regulation point in the calling path, and a processing stage after a processing result of the first network request is obtained;
The computing module is further configured to determine, according to the current routing cost, a second routing path that meets the path selection rule from the plurality of routing paths, so that when a second network request is received, traffic routing is performed on the second network request according to the second routing path; the second network request corresponds to the originating service node and the target service node.
9. A computer device, comprising: a processor, a storage device and a communication interface, the processor, the communication interface and the storage device being connected to each other, wherein the storage device stores executable program code, the processor being configured to invoke the executable program code to implement the network request processing method according to any of claims 1-7.
10. A computer readable storage medium storing a computer program comprising program instructions for execution by a processor for implementing the network request processing method according to any one of claims 1-7.
11. A computer program product comprising a computer program or computer instructions which, when executed by a processor, is adapted to carry out the network request processing method according to any one of claims 1 to 7.
CN202211277952.9A 2022-10-18 2022-10-18 Network request processing method, device, equipment, medium and program product Pending CN117956033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211277952.9A CN117956033A (en) 2022-10-18 2022-10-18 Network request processing method, device, equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211277952.9A CN117956033A (en) 2022-10-18 2022-10-18 Network request processing method, device, equipment, medium and program product

Publications (1)

Publication Number Publication Date
CN117956033A true CN117956033A (en) 2024-04-30

Family

ID=90802125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211277952.9A Pending CN117956033A (en) 2022-10-18 2022-10-18 Network request processing method, device, equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN117956033A (en)

Similar Documents

Publication Publication Date Title
CN109150627B (en) Virtual network mapping construction method based on dynamic resource demand and topology perception
CN107332913B (en) Optimized deployment method of service function chain in 5G mobile network
US10715638B2 (en) Method and system for server assignment using predicted network metrics
CN114090244B (en) Service arrangement method, device, system and storage medium
CN105515977B (en) Method, device and system for acquiring transmission path in network
CN109413202B (en) System and method for sorting block chain transaction information
CN112541019B (en) Block chain resource searching method and device
CN110402567A (en) Central caching is based in network centered on information
Salem et al. Toward Inference Delivery Networks: Distributing Machine Learning With Optimality Guarantees
CN111211984B (en) Method and device for optimizing CDN network and electronic equipment
Alchalabi et al. Fair server selection in edge computing with $ q $-value-normalized Action-Suppressed quadruple Q-Learning
CN114978908A (en) Computing power network node evaluation and operation method and device
Nguyen et al. Efficient virtual network embedding with node ranking and intelligent link mapping
CN111629390A (en) Network slice arranging method and device
CN109412976B (en) Data transmission method, device, system, server, electronic device and medium
CN117956033A (en) Network request processing method, device, equipment, medium and program product
CN116668364A (en) Route planning method and device for real-time audio and video network
CN115834054A (en) Multilevel key level management method and device
CN113315836B (en) File access request scheduling method and device, electronic equipment and storage medium
CN114205249B (en) Resource allocation method and terminal equipment
CN114500561A (en) Power internet of things network resource allocation decision method, system, device and medium
CN114492849A (en) Model updating method and device based on federal learning
Guan et al. Multidimensional Resource Fragmentation-Aware Virtual Network Embedding for IoT Applications in MEC Networks
CN114448838A (en) System reliability evaluation method
EP3216167B1 (en) Orchestrator and method for virtual network embedding using offline feedback

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination