Inference rescheduling method, device, equipment, medium and computer program product

Through the collaborative work between the inference scheduler and the service registration center or traffic gateway, inference requests are determined and transferred, which solves the problem of uneven load among multiple inference servers and improves the processing efficiency and business experience of inference requests.

CN118798355AActive Publication Date: 2024-10-18CHINA MOBILE GROUP DESIGN INST +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410723443.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-10-18
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

Existing technology cannot effectively solve the problem of uneven load among multiple inference servers, resulting in prolonged inference request processing time on high-load servers and affecting business experience.

Method used

Through the collaborative work between the inference scheduler and the service registration center or traffic gateway, based on the load status and request processing information of each inference server, the first inference server and the target inference server to be rescheduled are determined, and the requests to be rescheduled are Move from a heavily loaded server to a less loaded server.

Benefits of technology

It realizes collaborative inference request rescheduling between multiple inference servers, reduces the queuing time of inference requests, and improves the overall inference rescheduling performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798355A_ABST
    Figure CN118798355A_ABST
Patent Text Reader

Abstract

The invention provides a reasoning rescheduling method, device and equipment and a readable storage medium. The method is applied to a reasoning scheduling system comprising a reasoning scheduler and a plurality of reasoning servers. The method comprises the steps of determining a first inference server to be rescheduled and a target inference server receiving rescheduling based on load state information reported by each inference server under the condition that an inference scheduler and a service registration center are arranged together; determining a first reasoning server to be rescheduled and a target reasoning server receiving rescheduling based on request processing information of each reasoning server recorded by the reasoning scheduler under the condition that the flow gateways of the reasoning scheduler and the reasoning servers are arranged together; and sending the to-be-rescheduling request of the first reasoning server to the target reasoning server based on the request queuing time information of the first reasoning server and the request quantity information of the target reasoning server. According to the invention, the overall performance of reasoning rescheduling is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computing power scheduling technology, and in particular to an inference rescheduling method, device, equipment, medium and computer program product. Background Art

[0002] The existing rescheduling method for artificial intelligence (AI) model reasoning is to schedule all the reasoning requests queued in the same reasoning server. The reasoning server only rescheduling the requests that have been queued for too long in the reasoning server, and does not perceive the queue status of other reasoning servers, even if other reasoning servers are running the same AI model.

[0003] When the business volume of AI model reasoning grows to a certain scale, it is often necessary for multiple inference servers to provide inference services for an AI model at the same time. Inference on multiple inference servers will lead to uneven loads between different inference servers. However, the existing internal rescheduling method for a single inference server cannot solve the problem of uneven loads between inference servers, resulting in the processing time of inference requests on high-load inference servers being longer than requests on low-load inference servers, thus affecting the business experience. The existing solution adjusts the proportion of inference request business on each inference server through load balancers, gateways, and service registration and discovery centers, but cannot reschedule forwarded or allocated requests. Long-queued inference requests on high-load inference servers still cannot be processed in a timely manner, which in turn affects the experience of inference request business. Summary of the invention

[0004] The present invention provides an inference rescheduling method, device, equipment, medium and computer program product to solve the technical problem of low inference request rescheduling performance in existing inference request rescheduling schemes, thereby improving the overall performance of inference rescheduling.

[0005] The present invention provides an inference rescheduling method, which is applied to an inference scheduling system, wherein the inference scheduling system includes an inference scheduler and multiple inference servers; the method includes: In the case where the inference scheduler and the service registration center are co-located, based on the load status information reported by each of the inference servers, determining a first inference server to be rescheduled and a target inference server to receive the rescheduling; In the case where the inference scheduler is co-located with the traffic gateway of the inference server, determining a first inference server to be rescheduled and a target inference server to receive the rescheduling based on the request processing information of each of the inference servers recorded by the inference scheduler; Based on the request queuing time information of the first inference server and the request quantity information of the target inference server, the to-be-rescheduled request of the first inference server is sent to the target inference server.

[0006] According to an inference rescheduling method provided by the present invention, the determining of a first inference server to be rescheduled and a target inference server to be rescheduled based on the load status information reported by each of the inference servers comprises: Based on the queuing data reported by each of the inference servers, calculating the request queuing time at the tail of the request queue of each of the inference servers; Based on the comparison result between the request queuing time and the preset waiting time, a first inference server to be rescheduled among the multiple inference servers and a target inference server to receive the rescheduling are determined.

[0007] According to an inference rescheduling method provided by the present invention, the determining of the first inference server to be rescheduled and the target inference server to receive the rescheduling based on the request processing information of each inference server recorded by the inference scheduler comprises: Based on the request sending amount and the inference result return amount of each inference server recorded by the inference scheduler, the request queuing time at the tail of the request queue of each inference server is calculated; Based on the comparison result between the request queuing time and the preset waiting time, a first inference server to be rescheduled among the multiple inference servers and a target inference server to receive the rescheduling are determined.

[0008] According to a reasoning rescheduling method provided by the present invention, the sending of the to-be-rescheduled request of the first reasoning server to the target reasoning server based on the request queuing time information of the first reasoning server and the request quantity information of the target reasoning server comprises: Determining a number of rescheduling requests of the first inference server based on the number of queue requests and the inference throughput of the first inference server and the preset waiting time; Determine the tail request queuing time of the target inference server; Determine a first ranking result of all the first inference servers based on the number of rescheduling requests, and determine a target ranking result of all the target inference servers based on the queue time of the tail request; Based on the first sorting result and the target sorting result, the to-be-rescheduled request of the first inference server is sent to the target inference server.

[0009] According to an inference rescheduling method provided by the present invention, determining the number of rescheduling requests of the first inference server includes: Based on the request sending amount and the inference result return amount of each inference server recorded by the inference scheduler, the number of rescheduling requests of each inference server is calculated.

[0010] According to a reasoning rescheduling method provided by the present invention, the sending of the to-be-rescheduled request of the first reasoning server to the target reasoning server based on the first sorting result and the target sorting result comprises: Determining the first sorting result is based on the order of the number of rescheduling requests from large to small, and determining the target sorting result is based on the order of the queuing time of the tail request from small to large; The request to be rescheduled of the first inference server is sent to the target inference server; the ranking position of the first inference server in the first ranking result corresponds to the ranking position of the target inference server in the target ranking result.

[0011] The present invention also provides an inference rescheduling device, comprising the following modules: The first rescheduling determination module is used to determine the first inference server to be rescheduled and the target inference server to be rescheduled based on the load status information reported by each inference server when the inference scheduler and the service registration center are co-located; the second rescheduling determination module is used to determine the first inference server to be rescheduled and the target inference server to be rescheduled based on the request processing information of each inference server recorded by the inference scheduler when the inference scheduler and the traffic gateway of the inference server are co-located; The module for sending requests to be rescheduled is used to send the requests to be rescheduled of the first inference server to the target inference server based on the request queuing time information of the first inference server and the request quantity information of the target inference server.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the inference rescheduling method described above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the inference rescheduling method as described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned inference rescheduling methods.

[0015] The inference rescheduling method, device, equipment, medium and computer program product provided by the present invention, when the inference scheduler and the service registration center are co-installed, determine the first inference server to be rescheduled and the target inference server to be rescheduled based on the load status information reported by each inference server; when the inference scheduler and the traffic gateway of the inference server are co-installed, determine the first inference server to be rescheduled and the target inference server to be rescheduled based on the request processing information of each inference server recorded by the inference scheduler. Finally, based on the request queuing time information of the first inference server and the request quantity information of the target inference server, the request to be rescheduled of the first inference server is sent to the target inference server. The present application solves the problem that the current technical solution can only reschedule inference requests on a single inference server, realizes the collaborative rescheduling of inference requests between multiple inference servers running the same AI model, and reschedules the inference requests in the inference server with too long a queuing time to the inference server with a shorter queuing time, thereby improving the overall performance of inference rescheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 This is one of the flow charts of the reasoning rescheduling method provided by the present invention.

[0018] Figure 2 This is the second flowchart of the reasoning rescheduling method provided by the present invention.

[0019] Figure 3 It is a structural schematic diagram of the inference rescheduling device provided by the present invention.

[0020] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] Combine the following Figure 1-Figure 4 The invention describes the inference rescheduling method, apparatus, device, medium and computer program product of the present invention.

[0023] Reference Figure 1 , Figure 1 This is one of the flow diagrams of the inference rescheduling method in the embodiment of the present application. The inference rescheduling method provided in the embodiment of the present application is applied to an inference scheduling system, and the inference scheduling system includes an inference scheduler and multiple inference servers; the inference rescheduling method provided in the embodiment of the present application may include: Step 100, in the case where the inference scheduler and the service registration center are co-located, based on the load status information reported by each of the inference servers, determining a first inference server to be rescheduled and a target inference server to receive the rescheduling; Specifically, the inference rescheduling method provided in the embodiment of the present application is applied to an inference scheduling system, which includes an inference scheduler and multiple inference servers. Among them, the inference scheduler is responsible for selecting an inference server for an inference request and rescheduling the inference request according to the inference request queuing status of each inference server. The inference server is responsible for executing AI model inference and cooperating with the inference scheduler to complete the rescheduling of the inference request.

[0024] This application provides two solutions for the inference scheduler and the inference server to collaborate to implement inference rescheduling, wherein the first solution is as follows: The inference scheduler is jointly established with the service registration center, which is responsible for providing service registration and discovery services for the inference server. This solution has low forwarding requirements for the inference scheduler and is suitable for AI inference scenarios with large traffic such as video. When rescheduling inference, the inference scheduler receives the request queuing information of the inference server sent by the registered inference server (i.e., the load status information in this embodiment), and rescheduling some inference requests with too long queuing time based on the request queuing information of all registered inference servers. That is, based on the request queuing information of all registered inference servers, the first inference server that needs to be rescheduled and the target inference server that receives the rescheduled inference request are determined.

[0025] Step 200, in the case where the inference scheduler is co-located with the traffic gateway of the inference server, based on the request processing information of each of the inference servers recorded by the inference scheduler, determining a first inference server to be rescheduled and a target inference server to receive the rescheduling; Specifically, the second scheme for the inference scheduler and the inference server to collaborate and implement inference rescheduling is as follows: In solution 2, the inference scheduler is co-located with the traffic gateway of the inference server. This solution can make the business address of the inference server invisible to the AI ​​inference requester, thereby improving security and being more suitable for AI inference scenarios for public users. In this solution, the inference scheduler records the inference sending time and inference result receiving time of all inference requests for analyzing the request queuing situation of each inference server. Reschedule some inference requests with too long request queuing time. Specifically: the inference scheduler measures and determines whether there is an inference server that needs to initiate rescheduling based on the recorded request sending volume and inference result return volume of each inference server, and then determines the first inference server that needs to be rescheduled. The inference scheduler sorts all the inference servers that can currently receive scheduling requests according to the request queuing time at the end of the queue from small to large, and uses the top k inference servers with the smallest request queuing time at the end of the queue as the target inference servers that can accept rescheduling requests.

[0026] Step 300: Based on the request queuing time information of the first inference server and the request quantity information of the target inference server, the request to be rescheduled of the first inference server is sent to the target inference server.

[0027] Specifically, the inference scheduler sorts the k first inference servers that need to be rescheduled from large to small according to the number of requests that need to be rescheduled; similarly, the target inference servers are sorted from small to large according to the queuing time of the requests at the end of their queues. The first inference servers and target inference servers with the same sequence number in the above two sortings are associated. Specifically, the inference scheduler sends a rescheduling instruction to the inference server whose number of requests is ranked n (1≤n≤k) among the first inference servers that need to be rescheduled. The instruction includes the number of requests that need to be rescheduled on this inference server, and sends the requests that need to be rescheduled on this inference server to the inference scheduler in batches. At the same time, the inference scheduler sends the above instruction to the target inference server whose queuing time is ranked n (1≤n≤k) among the target inference servers, notifying it to prepare to receive the rescheduling request. Until all the requests to be rescheduled of all the first inference servers are sent to the target inference server, the rescheduling of the inference is completed.

[0028] In this embodiment, when the inference scheduler and the service registration center are co-installed, the first inference server to be rescheduled and the target inference server to receive the rescheduling are determined based on the load status information reported by each inference server; when the inference scheduler and the traffic gateway of the inference server are co-installed, the first inference server to be rescheduled and the target inference server to receive the rescheduling are determined based on the request processing information of each inference server recorded by the inference scheduler. Finally, based on the request queuing time information of the first inference server and the request quantity information of the target inference server, the request to be rescheduled of the first inference server is sent to the target inference server. The present application solves the problem that the current technical solution can only reschedule inference requests on a single inference server, and realizes the collaborative rescheduling of inference requests between multiple inference servers running the same AI model, and rescheduling the inference requests in the inference server with too long a queuing time to the inference server with a shorter queuing time, thereby improving the overall performance of inference rescheduling.

[0029] In one embodiment, the reasoning rescheduling method provided in the embodiment of the present application may further include: Step 110, based on the queuing data reported by each of the inference servers, calculating the request queuing time at the tail of the request queue of each of the inference servers; Step 120: Based on the comparison result between the request queuing time and the preset waiting time, determine a first inference server to be rescheduled among the multiple inference servers and a target inference server to be rescheduled.

[0030] Specifically, the specific contents of the above-mentioned plan 1 are as follows: The inference server initiates a service registration request to the inference scheduler, and the inference scheduler registers and returns a successful registration response. After successful registration, the inference server sends the request queue information of the inference server to the inference scheduler at the set time frequency, where the request queue information includes parameters such as the number of requests M in the current request queue of the inference server, the current number of requests received per second N, and the current inference throughput per second Q.

[0031] The inference scheduler determines whether there is an inference server that needs to be rescheduled based on the load status information reported by each inference server. Specifically, the inference scheduler calculates the request queuing time T1 at the end of the request queue of the inference server based on the request queuing data reported by the inference server, as shown in Formula 1.

[0032] X=(M-QTmax)×a;(2) The calculated queue time will be updated in real time according to the data reported by the inference server, so as to accurately reflect the queue time at the end of the inference server at each moment. If the queue time exceeds the preset maximum waiting time (i.e., the preset waiting time in this embodiment), it is determined that the request queue of the inference server needs to be rescheduled. The inference scheduler traverses the request queue data of all inference servers and calculates to obtain the number k of inference servers that need to be rescheduled.

[0033] For the first inference server determined to need to reschedule inference requests, the inference scheduler calculates the number of requests X that the first inference server needs to reschedule. The inference scheduler performs calculations based on the set maximum waiting time Tmax, the number of requests in the queue M, and the inference throughput per second Q, as shown in Formula 2, where a is an adjustable coefficient.

[0034] The inference scheduler sorts all the inference servers that can currently receive scheduling requests according to the request queuing time at the end of their queues from small to large, and selects the top k inference servers with the shortest request queuing time at the end of the queue as the target inference servers that can accept rescheduling requests.

[0035] This embodiment measures the request queuing time at the end of the request queue of each inference server through the queuing data reported by each inference server, and then provides a solution for determining the first inference server to be rescheduled and the target inference server to receive the rescheduling.

[0036] In one embodiment, the reasoning rescheduling method provided in the embodiment of the present application may further include: Step 210, based on the request sending amount and the inference result return amount of each of the inference servers recorded by the inference scheduler, the request queuing time at the tail of the request queue of each of the inference servers is calculated; Step 220: Based on the comparison result between the request queuing time and the preset waiting time, determine a first inference server to be rescheduled among the multiple inference servers and a target inference server to be rescheduled.

[0037] Specifically, in the above-mentioned solution 2, the traffic of all inference requests passes through the inference scheduler and is diverted by the inference scheduler. Therefore, the inference scheduler can record the amount of inference requests sent by the inference scheduler to each inference server and the amount of inference results returned at each moment. The inference scheduler uses the amount of requests sent to each inference server and the amount of inference results returned at each moment to calculate the queue time of the tail request of each inference server and the number of requests that need to be rescheduled. There is no need to report the request queue data through each inference server.

[0038] At time T after the inference server starts running, the queue time and number of queued requests of the inference server are shown in Formula 3 and Formula 4, where b is the queue time of the queued request at time T; c is the number of requests sent at time t; d is the number of results returned at time t. e is the number of queued requests at time T.

[0039] The inference scheduler measures and determines whether there is a first inference server that needs to be rescheduled based on the request volume and inference result return volume of each inference server recorded locally. Specifically, the inference scheduler uses the request volume and inference result return volume to each inference server at each moment to calculate the queue time of the tail request of each inference server, without the need to report the request queue data through each inference server.

[0040] The calculated queue time will be continuously updated over time to accurately reflect the queue time at the end of the queue at each moment. If the queue time exceeds the preset waiting time, it is determined that the request queue of the inference server needs to be rescheduled. The inference scheduler traverses all the inference server queue information data and calculates the number k of inference servers that need to be rescheduled.

[0041] For the first inference server, the inference scheduler calculates the number of requests that need to be rescheduled. Specifically, the inference scheduler uses the number of requests sent to each inference server at each moment and the number of inference results returned to calculate the number of requests that need to be rescheduled, without the need to report request queue data through each inference server. As shown in Formula 5, f is the number of results returned at moment T.

[0042] The inference scheduler sorts all the inference servers that can currently receive scheduling requests according to the request queuing time at the end of their queues from small to large, and selects the top k inference servers with the shortest request queuing time at the end of the queue as the target inference servers that can accept rescheduling requests.

[0043] This embodiment measures the request queuing time at the end of the request queue of each inference server by recording the request sending volume and the inference result return volume of each inference server through the inference scheduler, and then provides another solution for determining the first inference server to be rescheduled and the target inference server to receive the rescheduling.

[0044] Reference Figure 2 , Figure 2 This is the second flow chart of the reasoning rescheduling method in the embodiment of the present application. In one embodiment, the reasoning rescheduling method provided in the embodiment of the present application may also include: Step 310, determining the number of rescheduling requests of the first inference server based on the number of queue requests and the inference throughput of the first inference server and the preset waiting time; Step 320, determining the tail request queuing time of the target inference server; Step 330, determining a first ranking result of all the first inference servers based on the number of rescheduling requests, and determining a target ranking result of all the target inference servers based on the queue time of the tail request; Step 340: Based on the first sorting result and the target sorting result, the rescheduling request of the first inference server is sent to the target inference server.

[0045] The reasoning rescheduling method provided in the embodiment of the present application may further include: Step 311: Calculate the number of rescheduling requests for each inference server based on the request sending amount and the inference result return amount of each inference server recorded by the inference scheduler.

[0046] The reasoning rescheduling method provided in the embodiment of the present application may further include: Step 341, determining that the first sorting result is obtained based on the order of the number of rescheduling requests from large to small, and determining that the target sorting result is obtained based on the order of the queuing time of the tail requests from small to large; Step 342: Send the request to be rescheduled of the first inference server to the target inference server; the ranking position of the first inference server in the first ranking result corresponds to the ranking position of the target inference server in the target ranking result.

[0047] Specifically, in the above-mentioned schemes 1 and 2, the inference scheduler associates the inference servers with the same sequence number in the two sortings (the first sorting result and the target sorting result). Specifically, the inference scheduler sends an instruction to the inference server ranked n (1≤n≤k) in the target inference server, notifying it to receive the rescheduling request sent by the inference server ranked n in the number of requests in the first inference server. Similarly, the inference scheduler sends a rescheduling instruction to the inference server ranked n in the number of requests in the first inference server, and the instruction includes the IP address of the inference server ranked n in the target inference server, and the number of requests that need to be rescheduled on the first inference server, notifying it to send the requests that need to be rescheduled on the first inference server to the inference server ranked n in the queue time in batches.

[0048] Each first inference server that needs to be rescheduled sends the requests that need to be rescheduled on the inference server to the associated target inference server in batches according to the rescheduling instructions of the inference scheduler; each target inference server receives the rescheduling requests, puts these rescheduling requests into the rescheduling queue, and selects an opportunity to perform priority scheduling.

[0049] This embodiment improves the overall performance of reasoning rescheduling through a method of reasoning rescheduling with collaboration of multiple reasoning servers.

[0050] The inference rescheduling device provided by the present invention is described below. The inference rescheduling device described below and the inference rescheduling method described above can be referenced to each other.

[0051] Please refer to Figure 3 The present invention also provides an inference rescheduling device, comprising: A first rescheduling determination module 301 is used to determine a first inference server to be rescheduled and a target inference server to receive the rescheduling based on the load status information reported by each inference server when the inference scheduler and the service registration center are co-located; A second rescheduling determination module 302 is used to determine a first inference server to be rescheduled and a target inference server to receive the rescheduling based on the request processing information of each of the inference servers recorded by the inference scheduler when the inference scheduler and the traffic gateway of the inference server are co-installed; The rescheduling request sending module 303 is used to send the rescheduling request of the first inference server to the target inference server based on the request queuing time information of the first inference server and the request quantity information of the target inference server.

[0052] Optionally, the first rescheduling determination module includes: A first request queuing time measuring unit, configured to measure the request queuing time at the tail of the request queue of each of the inference servers based on the queuing data reported by each of the inference servers; The first rescheduling determination unit is used to determine a first inference server to be rescheduled and a target inference server to receive the rescheduling among the multiple inference servers based on a comparison result between the request queuing time and the preset waiting time.

[0053] Optionally, the second scheduling determination module includes: A second request queuing time measuring unit, configured to measure the request queuing time at the tail of the request queue of each inference server based on the request sending amount and the inference result return amount of each inference server recorded by the inference scheduler; The second rescheduling determination unit is used to determine a first inference server to be rescheduled and a target inference server to receive the rescheduling among the multiple inference servers based on a comparison result between the request queuing time and the preset waiting time.

[0054] Optionally, the module for sending a request to be rescheduled includes: a rescheduling request quantity determining unit, configured to determine the number of rescheduling requests of the first inference server based on the number of queue requests and the inference throughput of the first inference server and the preset waiting time; A tail request queuing time determining unit, used to determine the tail request queuing time of the target inference server; A sorting result determining unit, configured to determine a first sorting result of all the first inference servers based on the number of rescheduling requests, and determine a target sorting result of all the target inference servers based on the queueing time of the tail request; A rescheduling request sending unit is used to send the rescheduling request of the first inference server to the target inference server based on the first sorting result and the target sorting result.

[0055] Optionally, the rescheduling request quantity determining unit includes: The rescheduling request quantity calculation unit is used to calculate the number of rescheduling requests of each inference server based on the request sending amount and the inference result return amount of each inference server recorded by the inference scheduler.

[0056] Optionally, the rescheduling request sending unit includes: A determining unit, configured to determine that the first sorting result is obtained based on the order of the number of rescheduling requests from large to small, and determine that the target sorting result is obtained based on the order of the queuing time of the tail requests from small to large; A request sending unit is used to send the rescheduling request of the first inference server to the target inference server; the ranking position of the first inference server in the first ranking result corresponds to the ranking position of the target inference server in the target ranking result.

[0057] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the reasoning rescheduling method, which includes: in the case where the reasoning scheduler and the service registration center are co-located, based on the load status information reported by each of the reasoning servers, determining the first reasoning server to be rescheduled and the target reasoning server to receive the rescheduling; in the case where the reasoning scheduler and the traffic gateway of the reasoning server are co-located, based on the request processing information of each of the reasoning servers recorded by the reasoning scheduler, determining the first reasoning server to be rescheduled and the target reasoning server to receive the rescheduling; based on the request queuing time information of the first reasoning server and the request quantity information of the target reasoning server, sending the request to be rescheduled of the first reasoning server to the target reasoning server.

[0058] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0059] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the inference rescheduling method provided by the above methods, which includes: when the inference scheduler and the service registration center are co-installed, based on the load status information reported by each of the inference servers, determining the first inference server to be rescheduled and the target inference server to be rescheduled; when the inference scheduler and the traffic gateway of the inference server are co-installed, based on the request processing information of each of the inference servers recorded by the inference scheduler, determining the first inference server to be rescheduled and the target inference server to be rescheduled; based on the request queuing time information of the first inference server and the request quantity information of the target inference server, sending the rescheduling request of the first inference server to the target inference server.

[0060] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the inference rescheduling method provided by the above-mentioned methods, the method comprising: when the inference scheduler and the service registration center are co-installed, based on the load status information reported by each of the inference servers, determining the first inference server to be rescheduled and the target inference server to be rescheduled; when the inference scheduler and the traffic gateway of the inference server are co-installed, based on the request processing information of each of the inference servers recorded by the inference scheduler, determining the first inference server to be rescheduled and the target inference server to be rescheduled; based on the request queuing time information of the first inference server and the request quantity information of the target inference server, sending the rescheduling request of the first inference server to the target inference server.

[0061] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0062] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A reasoning rescheduling method, characterized in that: Applied to an inference scheduling system, the inference scheduling system includes an inference scheduler and multiple inference servers; the method includes: In the case where the inference scheduler and the service registration center are co-located, based on the load status information reported by each of the inference servers, determining a first inference server to be rescheduled and a target inference server to receive the rescheduling; In the case where the inference scheduler is co-located with the traffic gateway of the inference server, determining a first inference server to be rescheduled and a target inference server to receive the rescheduling based on the request processing information of each of the inference servers recorded by the inference scheduler; Based on the request queuing time information of the first inference server and the request quantity information of the target inference server, the to-be-rescheduled request of the first inference server is sent to the target inference server.

2. The inference rescheduling method according to claim 1, characterized in that: The determining, based on the load status information reported by each of the inference servers, the first inference server to be rescheduled and the target inference server to receive the reschedule comprises: based on the queuing data reported by each of the inference servers, calculating the request queuing time at the tail of the request queue of each of the inference servers; Based on the comparison result between the request queuing time and the preset waiting time, a first inference server to be rescheduled among the multiple inference servers and a target inference server to receive the rescheduling are determined.

3. The inference rescheduling method according to claim 2, characterized in that: The determining, based on the request processing information of each of the inference servers recorded by the inference scheduler, a first inference server to be rescheduled and a target inference server to receive the rescheduling comprises: Based on the request sending amount and the inference result return amount of each inference server recorded by the inference scheduler, the request queuing time at the tail of the request queue of each inference server is calculated; Based on the comparison result between the request queuing time and the preset waiting time, a first inference server to be rescheduled among the multiple inference servers and a target inference server to receive the rescheduling are determined.

4. The inference rescheduling method according to claim 3, characterized in that: The sending the to-be-rescheduled request of the first inference server to the target inference server based on the request queuing time information of the first inference server and the request quantity information of the target inference server comprises: Determining a number of rescheduling requests of the first inference server based on the number of queue requests and the inference throughput of the first inference server and the preset waiting time; Determine the tail request queuing time of the target inference server; Determine a first ranking result of all the first inference servers based on the number of rescheduling requests, and determine a target ranking result of all the target inference servers based on the queue time of the tail request; Based on the first sorting result and the target sorting result, the to-be-rescheduled request of the first inference server is sent to the target inference server.

5. The inference rescheduling method according to claim 4, characterized in that: Determining the number of rescheduling requests of the first inference server includes: Based on the request sending amount and the inference result return amount of each inference server recorded by the inference scheduler, the number of rescheduling requests of each inference server is calculated.

6. The inference rescheduling method according to claim 4, characterized in that: The sending of the to-be-rescheduled request of the first inference server to the target inference server based on the first sorting result and the target sorting result includes: determining that the first sorting result is obtained based on the order of the number of the rescheduling requests from large to small, and determining that the target sorting result is obtained based on the order of the queuing time of the tail requests from small to large; The request to be rescheduled of the first inference server is sent to the target inference server; the ranking position of the first inference server in the first ranking result corresponds to the ranking position of the target inference server in the target ranking result.

7. A reasoning rescheduling device, characterized in that: include: A first rescheduling determination module is used to determine a first inference server to be rescheduled and a target inference server to receive the rescheduling based on the load status information reported by each inference server when the inference scheduler and the service registration center are co-located; A second rescheduling determination module is used to determine the first inference server to be rescheduled and the target inference server to receive the rescheduling based on the request processing information of each of the inference servers recorded by the inference scheduler when the inference scheduler is co-installed with the traffic gateway of the inference server; The module for sending requests to be rescheduled is used to send the requests to be rescheduled of the first inference server to the target inference server based on the request queuing time information of the first inference server and the request quantity information of the target inference server.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the inference rescheduling method as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the inference rescheduling method as claimed in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the inference rescheduling method as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and device for load balancing in SIP (session initiation protocol) service cluster based on energy balance

    CN102480469A

  • Scheduling method and device

    CN112243298A

  • Inference method and device, electronic equipment and computer readable storage medium

    CN115766730A

  • Job scheduling method, server and server cluster

    CN116233022A

  • Resource scheduling method and device, equipment and storage medium

    CN116467053A