A network node interaction method and device

By calculating the reception, forwarding and delay times of service nodes, optimizing the bandwidth and number of nodes of the node cluster solves the problem that traditional load balancing methods are difficult to accurately characterize the load of the service provider, and achieves efficient service request processing and processing in complex environments. Network latency optimization.

CN118488064BActive Publication Date: 2024-10-25ZHEJIANG ZHEN SHAN SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410939403.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-10-25
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

Traditional load balancing methods are difficult to accurately calculate the calling relationship between service callers and service providers, cannot accurately characterize the load of service providers, and are difficult to evaluate the impact of load-related parameters on network traffic in complex business environments.

Method used

By calculating the reception time, forwarding time and delay time of each service node in the node cluster, the service node with the lowest network delay and fastest response speed is determined, and the bandwidth and number of nodes of the node cluster are optimized based on the latest response time information. , adjust network packet size to reduce network latency.

Benefits of technology

It achieves precise load balancing of service nodes in complex business environments, reduces network latency, improves service request processing efficiency, and optimizes node cluster performance based on real-time response time information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118488064B_ABST
    Figure CN118488064B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of computer communication technology, and provides a network node interaction method and device. In this embodiment, each service node in the node cluster can determine the reception consumption time, forwarding consumption time, and delay time of each other service node during interaction, so that when it is necessary to forward a service request, the target service node with the highest performance can be determined through the above-mentioned times, and the service request can be sent to the target service node for processing, ultimately reducing the network delay of the entire node cluster, thereby increasing the efficiency of processing service requests. In addition, the control center in this embodiment can also determine a method for improving the performance of the node cluster based on the reception consumption time, forwarding consumption time, and delay time of each service node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer communication technology, and in particular to a network node interaction method and device. Background Art

[0002] In the implementation of load balancing, the calculation of the service provider's consumption time is a very critical factor, because this time represents the actual situation of the service provider's current load capacity. Initially, load balancing was performed on multiple servers, and tasks of different numbers and costs were assigned to the servers according to the actual situation. With the rise of cloud computing and microservices, load balancing is increasingly developing towards abstraction, that is, the object of load balancing is the service provider, not necessarily a traditional server, but may be a virtual server, a container, or even a microservice. At the same time, in a complex business environment, there are a large number of service providers, and the calling relationship between the service caller and the service provider is becoming more and more complex. Mutual calls, that is, mutual service callers and service providers, often occur. In such an environment, the calling relationship between the service caller and the service provider often forms a complex network, and in this network, parallel calls and serial calls coexist. Therefore, the traditional time calculation method for load balancing often cannot accurately consider the impact of relevant parameters on the call in the calling network, and at the same time cannot accurately represent the accurate situation of the service provider's load.

[0003] In addition, it is difficult to evaluate the impact of load-related parameters on the load in advance, and the values ​​of these parameters have an important impact on the load processing. For example, under different network load conditions, how to select the best network packet size is also extremely important for the processing of network traffic, but traditional load balancing methods often ignore the selection of these parameter values. Summary of the invention

[0004] In view of this, the present application provides a network node interaction method and device to calculate the call and response time of each service node, so as to determine the processing speed of each service node, so that when the node cluster receives a service request, it can select the service node with the lowest network delay and the fastest response speed from each service node.

[0005] A first aspect of the present application provides a network node interaction method, which is applied to a service node in a node cluster, and the method includes:

[0006] The service node, as the last service node in the node cluster to process the service request, determines the reception time of the service request according to the size of the service request, the size of the preset network data packet and the transmission efficiency of the previous node when receiving the service request;

[0007] Processing the service request and determining the service processing time, and determining the forwarding time consumed for forwarding the service request according to the size of the processed service request, the transmission efficiency of the service node, the bandwidth and the preset network data packet size;

[0008] The reception consumption time, the forwarding consumption time and the service processing time form the latest response time information of the service node, and the response time information and the processed service request are sent to the previous node; or,

[0009] The service node, as a service node in the node cluster that intermediately processes the service request, determines a target service node through response time information of other nodes when receiving the service request, wherein the service request includes a plurality of sub-service requests;

[0010] dividing the service request into a first service request and a second service request, sending the transmission efficiency of the current node and the second service request to the target service node, and processing the first service request, wherein the first service request includes a sub-service request that can be processed by the current service node, and the second service request includes a sub-service request that cannot be processed by the current service node;

[0011] After receiving the latest response time information and the processed second service request returned by the target service node, determining the delay time according to the latest response time information, and sending the delay time, the latest response time information of the node, and the processed first and second service requests to the previous node; or,

[0012] The service node, as the first service node in the node cluster to process the service request, determines the target service node through the response time information of other nodes when receiving the service request;

[0013] The service request is divided into the first service request and the second service request, the transmission efficiency of this node and the second service request are sent to the target service node, the first service request is processed, and after receiving the latest response time information returned by the target service node, the response time information is modified according to the latest response time information.

[0014] Optionally, the method for determining the transfer efficiency includes:

[0015] The time t required for the service node to receive a packet is determined based on the time it takes the service node to receive the service request and the size of the network data packet. ri, according to the time consumed by the service node to forward the service request after processing and the size of the network data packet, the time t required for the service node to forward a packet is determined fi , through the formula αi =t ri / t fi Calculate the transmission efficiency, where αi is the transmission efficiency of the i-th service node.

[0016] Optionally, determining the reception consumption time of receiving the service request according to the size of the service request, the size of a preset network data packet and the transmission efficiency of a previous node includes:

[0017] By formula Calculate the reception consumption time, where t0=P / B, B is the bandwidth of the service node, P is the size of the preset network data packet, i=1,2,3...n, used to represent the order of the service nodes that receive the service request, Q i is the size of the service request received by this service node, α i-1 is the transmission efficiency of the previous node, α0=1, ⌈⌉ is the upward rounding function.

[0018] Optionally, determining the forwarding time consumed for forwarding the service request according to the size of the processed service request, the transmission efficiency of the service node, the bandwidth and the preset network data packet size includes:

[0019] By formula Determine the forwarding consumption time, where t0=P / B, B is the bandwidth of the service node, P is the size of the preset network data packet, i is the size of the service request processed by this service node, and αi is the transmission efficiency of this service node.

[0020] Optionally, determining the delay time according to the response time of the next service node includes:

[0021] By formula Determine the delay time, the TNi by the formula

[0022] Determine, where T pi is the time required for the ith service node to process the request, and the min function is the function that takes the minimum value of the parameter.

[0023] Optionally, the node cluster further includes a control node, and the control node synchronizes the latest response time information of each service node in real time. The method further includes:

[0024] The control node determines the transmission efficiency of each service node through the latest response time information, and when it is determined that the average value of the transmission efficiency of each service node in the node cluster is less than a threshold, increases the bandwidth to optimize the network delay of the node cluster; or,

[0025] The average receiving consumption time, average forwarding consumption time and average delay time between each service node are determined through the latest response time information. When the average receiving consumption time exceeds a threshold or / and the average forwarding time exceeds a threshold or / and the delay time exceeds a threshold, a service node is added to the node cluster.

[0026] Optionally, the method further includes:

[0027] The control node adjusts the size of the network data packet, determines the size of the network data packet when the network delay is the lowest according to the latest response time information, and determines the network data packet of this size as the optimal network data packet.

[0028] A second aspect of the present application provides a network node interaction device, which is applied to a service node in a node cluster, and is characterized in that the device includes:

[0029] A service request receiving unit, configured to determine a target service node through response time information of other nodes when receiving the service request, wherein the service request includes a plurality of sub-service requests;

[0030] a service request sending unit, configured to divide the service request into a first service request and a second service request, send the transmission efficiency of the current node and the second service request to the target service node, and process the first service request, wherein the first service request includes a sub-service request that can be processed by the current service node, and the second service request includes a sub-service request that cannot be processed by the current service node;

[0031] A reception consumption time determination unit, used to determine the reception consumption time of receiving the service request according to the size of the service request, the size of a preset network data packet and the transmission efficiency of a previous node when receiving the service request;

[0032] A forwarding consumption time determination unit, used to process the service request and determine the service processing time, and determine the forwarding consumption time of forwarding the service request according to the size of the processed service request, the transmission efficiency of the service node, the bandwidth and the preset network data packet size;

[0033] A first response time information sending unit, configured to compose the latest response time information of the service node through the reception consumption time, the forwarding consumption time and the service processing time, and send the response time information and the processed service request to the previous node;

[0034] A second response time information sending unit is used to determine a delay time according to the latest response time information after receiving the latest response time information returned by the target service node and the processed second service request, and send the delay time, the latest response time information of the node, and the processed first and second service requests to a previous node;

[0035] The receiving unit is used to modify the response time information according to the latest response time information after receiving the latest response time information returned by the target service node.

[0036] Optionally, the node cluster further includes a control node, and the control node synchronizes the latest response time information of each service node in real time. The device also includes:

[0037] a node cluster optimization unit, configured to enable the control node to determine the transmission efficiency of each service node through the latest response time information, and when it is determined that the average value of the transmission efficiency of each service node in the node cluster is less than a threshold, increase the bandwidth to optimize the network delay of the node cluster; or

[0038] The average receiving consumption time, average forwarding consumption time and average delay time between each service node are determined through the latest response time information. When the average receiving consumption time exceeds a threshold or / and the average forwarding time exceeds a threshold or / and the delay time exceeds a threshold, a service node is added to the node cluster.

[0039] Optionally, the device further comprises:

[0040] The optimal network data packet determination unit is used for the control node to adjust the size of the network data packet, determine the size of the network data packet when the network delay is the lowest according to the latest response time information, and determine the network data packet of this size as the optimal network data packet.

[0041] In the embodiments provided in the present application, each service node in a node cluster can determine the reception consumption time, forwarding consumption time, and delay time of each other service node during interaction, so that when it is necessary to forward a service request, the target service node with the highest performance can be determined through the above-mentioned times, and the service request can be sent to the target service node for processing, thereby ultimately reducing the network delay of the entire node cluster and increasing the efficiency of processing service requests.

[0042] Furthermore, the control center in this embodiment may also determine a method for improving the performance of the node cluster according to the reception consumption time, forwarding consumption time, and delay time of each service node. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flow chart of the method provided in the embodiment of the present application;

[0044] Figure 2 Another method flow chart provided for an embodiment of the present application;

[0045] Figure 3 Another method flow chart provided for an embodiment of the present application;

[0046] Figure 4 This is a diagram of the device structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0048] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0049] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0050] The present application provides a network node interaction method to accurately calculate the time consumed by each service provider in processing services, thereby providing support for designing accurate load balancing algorithms and reducing network latency.

[0051] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0052] In this application, the service nodes in the node cluster are divided into the first service node to process the service request, the service node to process the service request in the middle, and the service node to process the service request in the end according to the order in which the service request is received. When each service node receives a service request, it can determine whether the sender is a service node in the node cluster based on the sender information of the service request, such as IP address, device ID, MAC address, etc. If not, the service node is determined to be the first service node to process the service request. If so, the service request is used to determine whether to send it to the next node. If so, it is the service node to process the service request in the middle; if not, the service node is determined to be the service node to process the service request in the end.

[0053] When the service node is the last service node in the node cluster to process the service request, the flowchart of a network node interaction method provided by the present application is as follows: Figure 1 As shown, the process may include the following steps:

[0054] Step S101, when receiving the service request, determining the reception time of the service request according to the size of the service request, the size of a preset network data packet and the transmission efficiency of the previous node.

[0055] In this embodiment, since the request and service response data are divided into network data packets for transmission, the time required to transmit a data packet P is t0 = P / B, where B is the bandwidth of the service node and P is the preset network data packet size. The time for the first service node S1 to receive the request Q1 can be defined as , α i is the transmission efficiency of the ith service node, and α0 is preset to 1. Therefore, the time for the first service node S1 to receive request Q1 is , because the packet size is generally fixed, the rounding function is used here. The receiving time of the second service node S2 is actually not determined by S2, but by the sending time of S1, so the receiving time of S2 is defined as , and the subsequent receiving time is similar, and the formula for calculating the time consumed to receive the service request can be determined as: , where i=1,2,3...n, is used to represent the order of the service nodes that receive the service request, Q i is the size of the service request received by this service node, α i-1is the transmission efficiency of the previous node, ⌈⌉ is the upward rounding function, The time it takes for the node to receive the service request sent by the previous node.

[0056] In this embodiment, the time t required for the i-th service node to receive a packet can be determined according to the time consumed by the i-th service node to receive the service request and the size of the network data packet. ri Then, the time t required for the i-th service node to forward a packet is determined based on the time it takes for the i-th service node to forward the service request and the size of the network data packet. fi , and by the formula αi =t ri / t fi Calculate the transmission efficiency of the i-th service node.

[0057] Step S102, processing the service request and determining the service processing time, and determining the forwarding time of forwarding the service request according to the size of the processed service request, the transmission efficiency of the service node, the bandwidth and the preset network data packet size.

[0058] In this embodiment, the service node processes the received service request and performs timing, and determines the service processing time after the processing is completed. After processing, the formula Determine the forwarding time required to forward the service request, where O i The size of the service request processed by this service node.

[0059] Step S103: The reception consumption time, the forwarding consumption time and the service processing time are used to form the latest response time information of the service node, and the response time information and the processed service request are sent to the previous node.

[0060] In this embodiment, the service node sends the processed service request and the reception time, forwarding time and time required for the service node to process the service request to the previous node, so that the previous node can determine the latest response time information of the other node each time the node interacts, so that the next time the service request is forwarded, the optimal target service node can be determined from the latest response time information for forwarding, thereby reducing the network delay of the entire node cluster and increasing the efficiency of processing service requests.

[0061] When the service node serves as a service node in the node cluster for intermediate processing of the service request, a flowchart of a network node interaction method provided by the present application is as follows: Figure 2 As shown, the process may include the following steps:

[0062] Step S201: upon receiving the service request, determining a target service node through response time information of other nodes.

[0063] In this embodiment, the target service node may be a service node with the shortest reception consumption time and / or forwarding consumption time and / or delay time. The service node records the response time information of each service node that has interacted through the previous interaction process with other service nodes. For a node cluster that is put into use for the first time, the initial value of each consumption time in the response time information of each service node may be preset to 0. When the service node determines the target node, it may be determined according to different usage scenarios. For example, when the usage scenario requires the service node to receive the service request as soon as possible, the service node with the shortest reception consumption time may be determined as the target service node based on the response time information; or when the usage scenario requires the service processing to be completed as soon as possible, the service node with the shortest service processing time may be selected as the target service node, and so on.

[0064] Step S202: divide the service request into a first service request and a second service request, send the transmission efficiency of the current node and the second service request to the target service node, and process the first service request.

[0065] In this embodiment, the service request includes several sub-service requests, and the service node determines the sub-service request that it can process in the service request as the first service request and processes it. The service node determines the sub-service request that it cannot process as the second service request and sends it to the target service node determined in step S201.

[0066] Step S203, after receiving the latest response time information and the processed second service request returned by the target service node, determine the delay time according to the latest response time information, and send the delay time, the latest response time information of this node, and the processed first and second service requests to the previous node.

[0067] In this embodiment, after the target service node completes processing of the sub-service request that cannot be processed by the service node, that is, the second service request, the reception time of receiving the second service request, the forwarding time of the processed second service request, and the service processing time consumed for processing the second service request will be combined into the latest response time information, and the latest response time information and the processed second service request will be sent to the service node.

[0068] The service node determines the delay time through the latest response time information of the target node. The service node combines the reception time of the service request, the forwarding time of the first and second service requests after forwarding, the service processing time of the first service request, and the latest response time information of the service node, the delay time, and the first and second service requests after processing to form the latest response time information of the service node, and sends the latest response time information of the service node, the delay time, and the processed first and second service requests to the previous node.

[0069] In this embodiment, the method for determining the reception consumption time and the forwarding consumption time is as described in steps S101 - S102 , which will not be described in detail herein.

[0070] The method for determining the delay time using the latest response time information is as follows:

[0071] When the service node is the last node, there is no delay time, so the delay time is 0, so through the formula The delay time of the i-th service node can be determined, where T pi is the time required for the i-th service node to process the service request, T Ni is an intermediate parameter, and the determination method is

[0072] , min function is the function for taking the minimum value of parameters. Through the above formula, the i-th service node can determine the delay time through the latest response time information sent by the i+1-th service node.

[0073] Furthermore, in this embodiment, after the service node determines the receiving consumption time, forwarding consumption time and service processing time of the target node through the latest response time information, it can also determine the synchronization time for the two nodes to synchronously execute the service request based on the service processing time of this service node. For some service requests with high synchronization requirements, this synchronization time can also be used as a basis for determining the target service node.

[0074] Through the above steps, each interacting service node can obtain the latest response time information of the other party, so as to update the locally recorded response time information in real time, so that the optimal target service node can be determined each time through the response time information.

[0075] When the service node is the first service node in the node cluster to process the service request, the flowchart of a network node interaction method provided by the present application is as follows: Figure 3 As shown, the process may include the following steps:

[0076] Step S301: upon receiving the service request, determining a target service node through response time information of other nodes.

[0077] This step refers to S201 and will not be described in detail here.

[0078] Step S302: divide the service request into the first service request and the second service request, send the transmission efficiency of this node and the second service request to the target service node, process the first service request, and after receiving the latest response time information returned by the target service node, modify the response time information according to the latest response time information.

[0079] This step refers to S202 and will not be described in detail here.

[0080] It can be seen from the above embodiments that the difference between the first service node that processes the service request and the intermediate service node that processes the service request is that the intermediate service node needs to return the latest response time information, delay information, etc. to the previous service node, while the first service node does not need to return the above information because there is no previous node.

[0081] So far, completed Figure 1-Figure 3 The process shown.

[0082] In the above embodiment, each service node in the node cluster can determine the reception consumption time, forwarding consumption time, and delay time of each other service node during interaction, so that when it is necessary to forward a service request, the target service node with the highest performance can be determined through the above times, and the service request can be sent to the target service node for processing, ultimately reducing the network delay of the entire node cluster, thereby increasing the efficiency of processing service requests.

[0083] In another embodiment, the node cluster further includes a control node, and the control node synchronizes the latest response time information of each service node in real time. The method further includes:

[0084] The control node determines the transmission efficiency of each service node through the latest response time information, and when it is determined that the average value of the transmission efficiency of each service node in the node cluster is less than a threshold, increases the bandwidth to optimize the network delay of the node cluster; or,

[0085] The average receiving consumption time, average forwarding consumption time and average delay time between each service node are determined through the latest response time information. When the average receiving consumption time exceeds a threshold or / and the average forwarding time exceeds a threshold or / and the delay time exceeds a threshold, a service node is added to the node cluster.

[0086] In this embodiment, each service node can synchronize the response time information to the control node, so that the control node can determine whether the node cluster needs to be optimized based on the above response time information. For example, when it is determined from the response time information that the transmission efficiency of each service node has been decreasing, it is determined that the bandwidth is insufficient and the node cluster needs to be optimized by increasing the bandwidth. When the average reception consumption time, average forwarding consumption time and average delay time between each node are increasing, it is determined that the traffic volume of the node cluster is too large and needs to be optimized by adding service nodes.

[0087] Furthermore, the control node may also determine the total reception time and the total forwarding time of each service node processing a certain service request through the response time information.

[0088] The specific method is as follows:

[0089] After determining the time consumed by each service node to receive the service request, the total consumption time can be obtained by adding up the reception consumption time of each service node. Therefore, the calculation formula for the total reception consumption time is: ,in The total reception time.

[0090] After determining the forwarding consumption time of a single service node, the total forwarding consumption time can be obtained by adding up the forwarding consumption time of each service node. Therefore, the calculation formula for the total forwarding consumption time is: , where TR i is the total forwarding time, O i , i = 1, 2, . . . , n is the size of each processed service request, that is, the service request returned to the previous node, and n is the number of all service nodes.

[0091] The control node determines the total reception time and total forwarding time of each service node processing a service request through the response time information. When the same or similar service request is received subsequently, an optimal processing path can be arranged for it based on the total reception time and total forwarding time.

[0092] In another embodiment, the method further comprises:

[0093] The control node adjusts the size of the network data packet, determines the size of the network data packet when the network delay is the lowest according to the latest response time information, and determines the network data packet of this size as the optimal network data packet.

[0094] In this embodiment, by increasing or decreasing the size of the network data packet, the reception consumption time and forwarding consumption time in the response time information determined by the above formula will become larger or smaller. Therefore, by continuously adjusting the size of the network data packet, the minimum value of the reception consumption time plus the forwarding consumption time can be determined, and the network delay of the node cluster is the lowest at this time. The network data packet of this size can be determined as the optimal network data packet.

[0095] Through the above embodiments, the control center of the present application can also reduce the network delay of the entire node cluster according to the response time information and adjust the size of the network data packet, thereby increasing the efficiency of the node cluster in processing service requests.

[0096] like Figure 4 As shown, the present application also provides a network node interaction device, which is applied to a service node in a node cluster, and the device includes:

[0097] The service request receiving unit 401 is used to determine the target service node through the response time information of other nodes when receiving the service request, wherein the service request includes a plurality of sub-service requests;

[0098] The service request sending unit 402 is used to divide the service request into a first service request and a second service request, send the transmission efficiency of the current node and the second service request to the target service node, and process the first service request, wherein the first service request includes a sub-service request that can be processed by the current service node, and the second service request includes a sub-service request that cannot be processed by the current service node;

[0099] The reception consumption time determining unit 403 is used to determine the reception consumption time of receiving the service request according to the size of the service request, the size of the preset network data packet and the transmission efficiency of the previous node when receiving the service request;

[0100] The forwarding consumption time determining unit 404 is used to process the service request and determine the service processing time, and determine the forwarding consumption time of forwarding the service request according to the size of the processed service request, the transmission efficiency of the service node, the bandwidth and the preset network data packet size;

[0101] A first response time information sending unit 405 is used to form the latest response time information of the service node through the reception consumption time, the forwarding consumption time and the service processing time, and send the response time information and the processed service request to the previous node;

[0102] The second response time information sending unit 406 is used to determine the delay time according to the latest response time information after receiving the latest response time information returned by the target service node and the processed second service request, and send the delay time, the latest response time information of the node, and the processed first and second service requests to the previous node;

[0103] The receiving unit 407 is configured to modify the response time information according to the latest response time information after receiving the latest response time information returned by the target service node.

[0104] In another embodiment, the node cluster further includes a control node, and the control node synchronizes the latest response time information of each service node in real time. The device further includes:

[0105] a node cluster optimization unit 408, configured to enable the control node to determine the transmission efficiency of each service node through the latest response time information, and when it is determined that the average value of the transmission efficiency of each service node in the node cluster is less than a threshold, increase the bandwidth to optimize the network delay of the node cluster; or

[0106] The average receiving consumption time, average forwarding consumption time and average delay time between each service node are determined through the latest response time information. When the average receiving consumption time exceeds a threshold or / and the average forwarding time exceeds a threshold or / and the delay time exceeds a threshold, a service node is added to the node cluster.

[0107] In another embodiment, the apparatus further comprises:

[0108] The optimal network data packet determination unit 409 is used for the control node to adjust the size of the network data packet, determine the size of the network data packet when the network delay is the lowest according to the latest response time information, and determine the network data packet of this size as the optimal network data packet.

[0109] The above-mentioned embodiment of the present invention provides a network node interaction method, and based on this method, provides a network node interaction device. Through the above-mentioned method and device, the network delay of the entire node cluster can be reduced, thereby increasing the efficiency of processing service requests, and the node cluster can also be optimized according to different scenarios.

[0110] This embodiment also discloses a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement any of the above-mentioned network node interaction methods.

[0111] In addition, in the implementation of the network node interaction device in the above-mentioned example, the logical division of each program module is only an example. In actual application, the above-mentioned functions can be assigned to different program modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the network node interaction device is divided into different program modules to complete all or part of the functions described above.

[0112] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A network node interaction method, applied to a service node in a node cluster, characterized in that: The method comprises: The service node, as the last service node in the node cluster to process the service request, determines the reception time of the service request according to the size of the service request, the size of the preset network data packet and the transmission efficiency of the previous node when receiving the service request. The specific method includes: using the formula Calculate the reception consumption time, where t0 = P / B, B is the bandwidth of the service node, P is the size of the preset network data packet, i = 1, 2, 3 ... n, used to represent the order of the service nodes that receive the service request, Q i is the size of the service request received by this service node, α i-1 is the transmission efficiency of the previous node, α0=1, is an upward rounding function, wherein the method for determining the transmission efficiency includes: determining the time t required for the service node to receive a packet according to the time consumed by the service node to receive the service request and the size of the network data packet ri , according to the time consumed by the service node to forward the service request after processing and the size of the network data packet, the time t required for the service node to forward a packet is determined fi , through the formula α i =t ri / t fi Calculate the transfer efficiency, where α i is the transmission efficiency of the i-th service node; The service request is processed and the service processing time is determined. The forwarding time of the service request is determined by the size of the processed service request, the transmission efficiency of the service node, the bandwidth and the preset network data packet size. The specific method includes: Determine the forwarding consumption time, where O i The size of the service request processed by this service node; The reception consumption time, the forwarding consumption time and the service processing time form the latest response time information of the service node, and the response time information and the processed service request are sent to the previous node; or, The service node, as a service node in the node cluster that intermediately processes the service request, determines a target service node through response time information of other nodes when receiving the service request, wherein the service request includes a plurality of sub-service requests; dividing the service request into a first service request and a second service request, sending the transmission efficiency of the current node and the second service request to the target service node, and processing the first service request, wherein the first service request includes a sub-service request that can be processed by the current service node, and the second service request includes a sub-service request that cannot be processed by the current service node; After receiving the latest response time information and the processed second service request returned by the target service node, determining the delay time according to the latest response time information, and sending the delay time, the latest response time information of the node, and the processed first and second service requests to the previous node; or, The service node, as the first service node in the node cluster to process the service request, determines the target service node through the response time information of other nodes when receiving the service request; The service request is divided into the first service request and the second service request, the transmission efficiency of this node and the second service request are sent to the target service node, the first service request is processed, and after receiving the latest response time information returned by the target service node, the response time information is modified according to the latest response time information.

2. The method according to claim 1, characterized in that Determining the delay time according to the latest response time information includes: By formula Determine the delay time, the T Ni By formula Determine, where Tpi is the time required for the i-th service node to process the request, and min function is the function for taking the minimum value of the parameter.

3. The method according to claim 1, characterized in that The node cluster further includes a control node, and the control node synchronizes the latest response time information of each service node in real time. The method further includes: The control node determines the transmission efficiency of each service node through the latest response time information, and when it is determined that the average value of the transmission efficiency of each service node in the node cluster is less than a threshold, increases the bandwidth to optimize the network delay of the node cluster; or, The average receiving consumption time, average forwarding consumption time and average delay time between each service node are determined through the latest response time information. When the average receiving consumption time exceeds a threshold or / and the average forwarding time exceeds a threshold or / and the delay time exceeds a threshold, a service node is added to the node cluster.

4. The method according to claim 3, characterized in that The method further comprises: The control node adjusts the size of the network data packet, determines the size of the network data packet when the network delay is the lowest according to the latest response time information, and determines the network data packet of this size as the optimal network data packet.

5. A network node interaction device, applied to a service node in a node cluster, characterized in that: The device comprises: A service request receiving unit, configured to determine a target service node through response time information of other nodes when receiving the service request, wherein the service request includes a plurality of sub-service requests; a service request sending unit, configured to divide the service request into a first service request and a second service request, send the transmission efficiency of the current node and the second service request to the target service node, and process the first service request, wherein the first service request includes a sub-service request that can be processed by the current service node, and the second service request includes a sub-service request that cannot be processed by the current service node; The receiving consumption time determining unit is used to determine the receiving consumption time of receiving the service request according to the size of the service request, the size of the preset network data packet and the transmission efficiency of the previous node when receiving the service request. The specific method includes: Calculate the reception consumption time, where t0 = P / B, B is the bandwidth of the service node, P is the size of the preset network data packet, i = 1, 2, 3 ... n, used to represent the order of the service nodes that receive the service request, Q i is the size of the service request received by this service node, α i-1 is the transmission efficiency of the previous node, α0=1, is an upward rounding function, wherein the method for determining the transmission efficiency includes: determining the time t required for the service node to receive a packet according to the time consumed by the service node to receive the service request and the size of the network data packet ri , according to the time consumed by the service node to forward the service request after processing and the size of the network data packet, the time t required for the service node to forward a packet is determined fi , through the formula α i =t ri / t fi Calculate the transfer efficiency, where α i is the transmission efficiency of the i-th service node; The forwarding consumption time determination unit is used to process the service request and determine the service processing time, and determine the forwarding consumption time of forwarding the service request according to the size of the processed service request, the transmission efficiency of the service node, the bandwidth and the preset network data packet size. The specific method includes: Determine the forwarding consumption time, where O i The size of the service request processed by this service node; A first response time information sending unit, configured to compose the latest response time information of the service node through the reception consumption time, the forwarding consumption time and the service processing time, and send the response time information and the processed service request to the previous node; A second response time information sending unit is used to determine a delay time according to the latest response time information after receiving the latest response time information returned by the target service node and the processed second service request, and send the delay time, the latest response time information of the node, and the processed first and second service requests to a previous node; The receiving unit is used to modify the response time information according to the latest response time information after receiving the latest response time information returned by the target service node.

6. The device according to claim 5, characterized in that The node cluster further includes a control node, and the control node synchronizes the latest response time information of each service node in real time. The device also includes: a node cluster optimization unit, configured to enable the control node to determine the transmission efficiency of each service node through the latest response time information, and when it is determined that the average value of the transmission efficiency of each service node in the node cluster is less than a threshold, increase the bandwidth to optimize the network delay of the node cluster; or The average receiving consumption time, average forwarding consumption time and average delay time between each service node are determined through the latest response time information. When the average receiving consumption time exceeds a threshold or / and the average forwarding time exceeds a threshold or / and the delay time exceeds a threshold, a service node is added to the node cluster.

7. The device according to claim 6, characterized in that The device also includes: The optimal network data packet determination unit is used for the control node to adjust the size of the network data packet, determine the size of the network data packet when the network delay is the lowest according to the latest response time information, and determine the network data packet of this size as the optimal network data packet.