A method and device for scheduling artificial intelligence accelerator card based on domestic CPU and OS

By deploying artificial intelligence accelerator cards and dispatch centers in domestic CPU and OS environments, and using dynamic scheduling strategies to manage TCP connection pools, the problem of low artificial intelligence reasoning efficiency under domestic CPU and OS is solved, and efficient data processing and resource management are achieved. .

CN113835876BActive Publication Date: 2024-09-17INSPUR QILU SOFTWARE IND +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110954086.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-19
Publication Date
2024-09-17
Estimated Expiration
2041-08-19

AI Technical Summary

Technical Problem

In the domestic CPU and OS environment, it is technically difficult to apply GPU for artificial intelligence inference. Especially as the number of cameras increases, how to quickly and accurately perform face recognition has become an urgent issue.

Method used

Adopting an artificial intelligence accelerator card scheduling method based on domestic CPU and OS, through multiple artificial intelligence accelerator cards and scheduling centers deployed on the server, the management and resource scheduling of TCP connection pools are realized, and the minimum resource ratio strategy and accelerator card pro- and strategies, dynamically allocate TCP connections, monitor and adjust the number of TCP connection pools to improve data processing efficiency.

Benefits of technology

It effectively improves the data processing rate and resource utilization, realizes automatic TCP connection pool expansion and scaling in different client concurrency scenarios, and adapts to different application needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113835876B
    Figure CN113835876B
Patent Text Reader

Abstract

The present invention discloses a method and device for scheduling an artificial intelligence accelerator card based on a domestic CPU and OS, and relates to the technical field of resource scheduling. In order to better schedule the accelerator card, a scheme is adopted involving a server based on a domestic CPU and OS, multiple artificial intelligence accelerator cards deployed on the server, and a scheduling center deployed in a cluster management tool; first, the server is used as a client for pushing video streams, and the artificial intelligence accelerator card is used as a TCP server for monitoring the client port; then, a TCP connection pool is established, and the scheduling center monitors the number of remaining connections in the TCP connection pool; finally, when the client needs to process data, it initiates a request to the scheduling center, and the scheduling center allocates a TCP connection to the client according to the scheduling strategy selected by the user, and the client can send the collected image to the corresponding artificial intelligence accelerator card through the allocated TCP connection. The present invention can improve the efficiency of the artificial intelligence accelerator card in processing image data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of technical resource scheduling, and more specifically to an artificial intelligence accelerator card scheduling method and device based on a domestically produced CPU and OS. Background Art

[0002] With the development of informatization and deep learning in domestic enterprises, many enterprises and governments are using more and more artificial intelligence technologies in their actual business. Due to the particularity of domestic CPU and operating system hardware and software environment at the instruction set and operating system level, the application of GPU for artificial intelligence reasoning still has certain technical difficulties. For example, face recognition technology is often used by companies and government agencies for functions such as clocking in, access control, and mask detection. With the increase in the number of cameras, how to quickly and accurately identify people has become an urgent problem that needs to be solved. Summary of the invention

[0003] In view of the needs and shortcomings of current technological development, the present invention provides an artificial intelligence accelerator card scheduling method and device based on domestic CPU and OS.

[0004] First, the present invention provides an artificial intelligence accelerator card scheduling method based on a domestic CPU and OS. The technical solution adopted to solve the above technical problems is as follows:

[0005] A method for scheduling an artificial intelligence accelerator card based on a domestically produced CPU and OS, the implementation process of which involves a server based on a domestically produced CPU and OS, multiple artificial intelligence accelerator cards deployed on the server, and a scheduling center deployed in a cluster management tool;

[0006] First, the server is used as the client to push the video stream, and the AI ​​accelerator card is used as the TCP server to monitor the client port;

[0007] Subsequently, a TCP connection pool is established, and the dispatch center monitors the number of remaining connections in the TCP connection pool;

[0008] Finally, when the client needs to process data, it initiates a request to the dispatch center. The dispatch center allocates a TCP connection to the client based on the scheduling strategy selected by the user. The client can then send the collected images to the corresponding artificial intelligence acceleration card through the allocated TCP connection.

[0009] Specifically, the scheduling strategies involved include the minimum resource proportion strategy and the accelerator card affinity strategy;

[0010] (A) The minimum resource ratio strategy is determined by the utilization rate of the AI ​​accelerator card and the number of models. The utilization rate of the AI ​​accelerator card is processed using the following piecewise function:

[0011]

[0012] Among them, usage represents the utilization rate of the artificial intelligence accelerator card, and its range is 0-1. Here only the sin function is used. Therefore, the utilization rate needs to be changed; when the utilization rate of the AI ​​accelerator card is greater than 80%, the speed will drop rapidly, and the coefficient It is obtained based on the test;

[0013] (B) When the accelerator card affinity strategy is adopted, data will be sent to each AI accelerator card in turn. When returning the result, the AI ​​accelerator card will return the calculation time to the dispatch center. The call center will give the corresponding probability according to the last calculation time, and then select the AI ​​accelerator card with the highest probability as the target accelerator card. However, when the utilization rate of a specified AI accelerator card is higher than 80%, the dispatch center will replace the target accelerator card for it. When the utilization rate of all AI accelerator cards is higher than 80%, the dispatch center will select the AI ​​accelerator card with the highest probability at the beginning.

[0014] More specifically, the dispatch center involved monitors the number of remaining connections in the TCP connection pool and collects the models running on the AI ​​accelerator card and its utilization rate;

[0015] When the affinity strategy of the artificial intelligence accelerator card is turned on, the dispatch center will also collect the speed at which the artificial intelligence accelerator card processes data so as to reasonably allocate resources according to the actual operation of the artificial intelligence accelerator card.

[0016] More specifically, the scheduling center involved monitors the number of remaining connections in the TCP connection pool. When the number of remaining connections in the TCP connection pool is too large within a period of time, the scheduling center will reduce the number of TCP connection pools, otherwise it will increase the number of TCP connection pools.

[0017] More specifically, the dispatch center involved collects the number of remaining connections in the TCP connection pool every 1 minute. If the average number of remaining connections within 5 minutes is greater than 10, the TCP connection pool will be reduced by 10. Correspondingly, if the number of remaining connections is 0 within 5 minutes, it will be increased by 10.

[0018] Secondly, the present invention provides an artificial intelligence acceleration card scheduling device based on a domestic CPU and OS, and the technical solutions adopted to solve the above technical problems are as follows:

[0019] An artificial intelligence accelerator card scheduling device based on domestic CPU and OS, the structure of which includes:

[0020] The server based on domestic CPU and OS acts as the client for pushing video streams and is used to send the collected images to the AI ​​accelerator card;

[0021] Multiple AI accelerator cards are deployed on the server to monitor client ports;

[0022] The dispatch center is used to allocate TCP connections to clients according to the dispatch strategy selected by the user, so that the images collected by the client are sent to the corresponding artificial intelligence acceleration card through the TCP connection.

[0023] Specifically, the scheduling strategies involved include the minimum resource proportion strategy and the accelerator card affinity strategy;

[0024] (A) The minimum resource ratio strategy is determined by the utilization rate of the AI ​​accelerator card and the number of models. The utilization rate of the AI ​​accelerator card is processed using the following piecewise function:

[0025]

[0026] Among them, usage represents the utilization rate of the artificial intelligence accelerator card, and its range is 0-1. Here only the sin function is used. Therefore, the utilization rate needs to be changed; when the utilization rate of the AI ​​accelerator card is greater than 80%, the speed will drop rapidly, and the coefficient It is obtained based on the test;

[0027] (B) When the accelerator card affinity strategy is adopted, data will be sent to each AI accelerator card in turn. When returning the result, the AI ​​accelerator card will return the calculation time to the dispatch center. The call center will give the corresponding probability according to the last calculation time, and then select the AI ​​accelerator card with the highest probability as the target accelerator card. However, when the utilization rate of a specified AI accelerator card is higher than 80%, the dispatch center will replace the target accelerator card for it. When the utilization rate of all AI accelerator cards is higher than 80%, the dispatch center will select the AI ​​accelerator card with the highest probability at the beginning.

[0028] More specifically, the dispatch center involved monitors the number of remaining connections in the TCP connection pool and collects the models running on the AI ​​accelerator card and its utilization rate;

[0029] When the affinity strategy of the artificial intelligence accelerator card is turned on, the dispatch center will also collect the speed at which the artificial intelligence accelerator card processes data so as to reasonably allocate resources according to the actual operation of the artificial intelligence accelerator card.

[0030] More specifically, the scheduling center involved monitors the number of remaining connections in the TCP connection pool. When the number of remaining connections in the TCP connection pool is too large within a period of time, the scheduling center will reduce the number of TCP connection pools, otherwise it will increase the number of TCP connection pools.

[0031] More specifically, the dispatch center involved collects the number of remaining connections in the TCP connection pool every 1 minute. If the average number of remaining connections within 5 minutes is greater than 10, the TCP connection pool will be reduced by 10. Correspondingly, if the number of remaining connections is 0 within 5 minutes, it will be increased by 10.

[0032] The method and device for scheduling an artificial intelligence accelerator card based on a domestically produced CPU and OS of the present invention have the following beneficial effects compared with the prior art:

[0033] (1) The present invention realizes the management based on artificial intelligence acceleration card under domestic CPU and OS, effectively improving the data processing rate;

[0034] (2) The present invention can automatically expand and scale the TCP connection pool to adapt to concurrent application scenarios of different clients. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Attached Figure 1 It is a connection block diagram of the present invention. DETAILED DESCRIPTION

[0036] In order to make the technical solution, the technical problem solved and the technical effect of the present invention more clearly understood, the technical solution of the present invention is clearly and completely described below in conjunction with specific embodiments.

[0037] Embodiment 1:

[0038] Combined with Figure 1 ,This embodiment proposes a scheduling method for artificial intelligence accelerator cards based on domestic CPU and OS, and its implementation process involves a server based on domestic CPU and OS, multiple artificial intelligence accelerator cards deployed on the server, and a scheduling center deployed in the cluster management tool zookeeper or nacos;

[0039] First, the server is used as the client to push the video stream, and the AI ​​accelerator card is used as the TCP server to monitor the client port;

[0040] Subsequently, a TCP connection pool is established, and the dispatch center monitors the number of remaining connections in the TCP connection pool;

[0041] Finally, when the client needs to process data, it initiates a request to the dispatch center. The dispatch center allocates a TCP connection to the client based on the scheduling strategy selected by the user. The client can then send the collected images to the corresponding artificial intelligence acceleration card through the allocated TCP connection.

[0042] In this scheduling process, it is necessary to add that the initial TCP connection pool size of each AI accelerator card is the number of cameras. By default, the data used for detection, deduplication, key point detection, and feature extraction will be sent to the AI ​​accelerator card running this model. This is a theoretical situation, but in reality, there are not always faces under the camera. When there are no faces, only the detection service is running. If data is only sent to one AI accelerator card at this time, the other three accelerator cards will be idle, resulting in a waste of resources. Therefore, the scheduling center will allocate TCP connections to the client according to the scheduling strategy selected by the user, thereby improving the efficiency of AI accelerator cards in processing data.

[0043] In this embodiment, the scheduling strategies that the user can select include a minimum resource proportion strategy and an accelerator card affinity strategy.

[0044] in:

[0045] (A) The minimum resource ratio strategy is determined by the utilization rate of the AI ​​accelerator card and the number of models. The utilization rate of the AI ​​accelerator card is processed using the following piecewise function:

[0046]

[0047] Among them, usage represents the utilization rate of the artificial intelligence accelerator card, and its range is 0-1. Here only the sin function is used. Therefore, the utilization rate needs to be changed; when the utilization rate of the AI ​​accelerator card is greater than 80%, the speed will drop rapidly, and the coefficient It is obtained based on the test;

[0048] (B) When the accelerator card affinity strategy is adopted, data will be sent to each AI accelerator card in turn. When returning the result, the AI ​​accelerator card will return the calculation time to the dispatch center. The call center will give the corresponding probability according to the last calculation time, and then select the AI ​​accelerator card with the highest probability as the target accelerator card. However, when the utilization rate of a specified AI accelerator card is higher than 80%, the dispatch center will replace the target accelerator card for it. When the utilization rate of all AI accelerator cards is higher than 80%, the dispatch center will select the AI ​​accelerator card with the highest probability at the beginning.

[0049] In this embodiment, the dispatch center monitors the number of remaining connections in the TCP connection pool and collects the models running on the artificial intelligence accelerator card and its utilization rate;

[0050] When the affinity strategy of the artificial intelligence accelerator card is turned on, the dispatch center will also collect the speed at which the artificial intelligence accelerator card processes data so as to reasonably allocate resources according to the actual operation of the artificial intelligence accelerator card.

[0051] In this embodiment, the dispatch center collects the number of remaining connections in the TCP connection pool every 1 minute. If the average number of remaining connections within 5 minutes is greater than 10, the TCP connection pool is reduced by 10. Correspondingly, if the number of remaining connections is 0 within 5 minutes, it is increased by 10.

[0052] Embodiment 2:

[0053] Combined with Figure 1 ,This embodiment proposes an artificial intelligence acceleration card scheduling device based on domestic CPU and OS, and its structure includes:

[0054] The server based on domestic CPU and OS acts as the client for pushing video streams and is used to send the collected images to the AI ​​accelerator card;

[0055] Multiple AI accelerator cards are deployed on the server to monitor client ports;

[0056] The dispatch center is used to allocate TCP connections to clients according to the dispatch strategy selected by the user, so that the images collected by the client are sent to the corresponding artificial intelligence acceleration card through the TCP connection.

[0057] During the operation of the above-mentioned scheduling device, it should be supplemented that the initial TCP connection pool size of each artificial intelligence accelerator card is the number of cameras. By default, the data used for detection, deduplication, key point detection and feature extraction will be sent to the artificial intelligence accelerator card running this model. This is a theoretical situation, but in reality, there are not always faces under the camera. When there are no faces, only the detection service is running. If data is only sent to one artificial intelligence accelerator card at this time, the other three accelerator cards will be idle, resulting in a waste of resources. Therefore, the scheduling center will allocate TCP connections to the client according to the scheduling strategy selected by the user, thereby improving the efficiency of the artificial intelligence accelerator card in processing data.

[0058] In this embodiment, the scheduling strategies that the user can select include a minimum resource proportion strategy and an accelerator card affinity strategy.

[0059] in:

[0060] (A) The minimum resource ratio strategy is determined by the utilization rate of the AI ​​accelerator card and the number of models. The utilization rate of the AI ​​accelerator card is processed using the following piecewise function:

[0061]

[0062] Among them, usage represents the utilization rate of the artificial intelligence accelerator card, and its range is 0-1. Here only the sin function is used. Therefore, the utilization rate needs to be changed; when the utilization rate of the AI ​​accelerator card is greater than 80%, the speed will drop rapidly, and the coefficient It is obtained based on the test;

[0063] (B) When the accelerator card affinity strategy is adopted, data will be sent to each AI accelerator card in turn. When returning the result, the AI ​​accelerator card will return the calculation time to the dispatch center. The call center will give the corresponding probability according to the last calculation time, and then select the AI ​​accelerator card with the highest probability as the target accelerator card. However, when the utilization rate of a specified AI accelerator card is higher than 80%, the dispatch center will replace the target accelerator card for it. When the utilization rate of all AI accelerator cards is higher than 80%, the dispatch center will select the AI ​​accelerator card with the highest probability at the beginning.

[0064] In this embodiment, the dispatching center monitors the number of remaining connections in the TCP connection pool, and collects the models running on the artificial intelligence accelerator card and its utilization rate; when the affinity strategy of the artificial intelligence accelerator card is turned on, the dispatching center also collects the speed at which the artificial intelligence accelerator card processes data, so as to reasonably allocate resources according to the actual operation of the artificial intelligence accelerator card.

[0065] In this embodiment, the dispatch center monitors the number of remaining connections in the TCP connection pool. When the number of remaining connections in the TCP connection pool is too large within a period of time, the dispatch center will reduce the number of TCP connection pools, otherwise the number of TCP connection pools will be increased. Specifically, the dispatch center collects the number of remaining connections in the TCP connection pool every 1 minute. If the average number of remaining connections within 5 minutes is greater than 10, the TCP connection pool will be reduced by 10. Correspondingly, if the number of remaining connections is 0 within 5 minutes, it will be increased by 10.

[0066] In summary, the artificial intelligence acceleration card scheduling method and device based on domestic CPU and OS of the present invention can improve the processing efficiency of image data.

[0067] Based on the above specific embodiments of the present invention, any improvements and modifications made to the present invention by those skilled in the art without departing from the principles of the present invention shall fall within the patent protection scope of the present invention.

Claims

1. A scheduling method for artificial intelligence accelerator card based on domestic CPU and OS, Features ,The implementation process involves servers based on domestic CPUs and OS, multiple AI ,accelerator cards deployed on the servers, and a scheduling center deployed in the cluster ,management tool; First, the server is used as the client to push the video stream, and the AI ​​accelerator card is used as the TCP server to monitor the client port; Subsequently, a TCP connection pool is established, and the dispatch center monitors the number of remaining connections in the TCP connection pool; Finally, when the client needs to process data, it sends a request to the dispatch center. The dispatch center allocates a TCP connection to the client according to the dispatch strategy selected by the user. The client can then send the collected images to the corresponding AI acceleration card through the allocated TCP connection. In this process, the scheduling strategy includes the minimum resource proportion strategy and the accelerator card affinity strategy, among which: (A) The minimum resource ratio strategy is determined by the utilization rate of the AI ​​accelerator card and the number of models. The utilization rate of the AI ​​accelerator card is processed using the following piecewise function: Among them, usage represents the utilization rate of the artificial intelligence accelerator card, and its range is 0-1. Here only the sin function is used. Therefore, the utilization rate needs to be changed; when the utilization rate of the AI ​​accelerator card is greater than 80%, the speed will drop rapidly, and the coefficient It is obtained based on the test; (B) When the accelerator card affinity strategy is adopted, data will be sent to each AI accelerator card in turn. When returning the result, the AI ​​accelerator card will return the calculation time to the dispatch center. The call center will give the corresponding probability according to the last calculation time, and then select the AI ​​accelerator card with the highest probability as the target accelerator card. However, when the utilization rate of a specified AI accelerator card is higher than 80%, the dispatch center will replace the target accelerator card for it. When the utilization rate of all AI accelerator cards is higher than 80%, the dispatch center will select the AI ​​accelerator card with the highest probability at the beginning.

2. According to claim 1, an artificial intelligence acceleration card scheduling method based on domestic CPU and OS, It is characterized in that The dispatch center monitors the number of remaining connections in the TCP connection pool and collects the models running on the artificial intelligence accelerator card and their utilization rates; When the affinity strategy of the artificial intelligence accelerator card is turned on, the dispatch center will also collect the speed at which the artificial intelligence accelerator card processes data so as to reasonably allocate resources according to the actual operation of the artificial intelligence accelerator card.

3. According to claim 2, an artificial intelligence acceleration card scheduling method based on domestic CPU and OS, It is characterized in that The dispatch center monitors the number of remaining connections in the TCP connection pool. When the number of remaining connections in the TCP connection pool is too large within a period of time, the dispatch center will reduce the number of TCP connection pools, otherwise it will increase the number of TCP connection pools.

4. According to claim 3, an artificial intelligence acceleration card scheduling method based on domestic CPU and OS, It is characterized in that The dispatch center collects the number of remaining connections in the TCP connection pool every 1 minute. If the average number of remaining connections within 5 minutes is greater than 10, the TCP connection pool is reduced by 10. Correspondingly, if the number of remaining connections is 0 within 5 minutes, it is increased by 10.

5. An artificial intelligence accelerator card scheduling device based on domestic CPU and OS, It is characterized in that Its structure includes: The server based on domestic CPU and OS acts as the client for pushing video streams and is used to send the collected images to the AI ​​accelerator card; Multiple AI accelerator cards are deployed on the server to monitor client ports; The dispatch center is used to allocate TCP connections to clients according to the dispatch strategy selected by the user, so that the images collected by the client are sent to the corresponding artificial intelligence acceleration card through the TCP connection; The scheduling strategies include the minimum resource proportion strategy and the accelerator card affinity strategy; (A) The minimum resource ratio strategy is determined by the utilization rate of the AI ​​accelerator card and the number of models. The utilization rate of the AI ​​accelerator card is processed using the following piecewise function: Among them, usage represents the utilization rate of the artificial intelligence accelerator card, and its range is 0-1. Here only the sin function is used. Therefore, the utilization rate needs to be changed; when the utilization rate of the AI ​​accelerator card is greater than 80%, the speed will drop rapidly, and the coefficient It is obtained based on the test; (B) When the accelerator card affinity strategy is adopted, data will be sent to each AI accelerator card in turn. When returning the result, the AI ​​accelerator card will return the calculation time to the dispatch center. The call center will give the corresponding probability according to the last calculation time, and then select the AI ​​accelerator card with the highest probability as the target accelerator card. However, when the utilization rate of a specified AI accelerator card is higher than 80%, the dispatch center will replace the target accelerator card for it. When the utilization rate of all AI accelerator cards is higher than 80%, the dispatch center will select the AI ​​accelerator card with the highest probability at the beginning.

6. According to claim 5, an artificial intelligence acceleration card scheduling device based on domestic CPU and OS, It is characterized in that The dispatch center monitors the number of remaining connections in the TCP connection pool and collects the models running on the artificial intelligence accelerator card and their utilization rates; When the affinity strategy of the artificial intelligence accelerator card is turned on, the dispatch center will also collect the speed at which the artificial intelligence accelerator card processes data so as to reasonably allocate resources according to the actual operation of the artificial intelligence accelerator card.

7. According to claim 6, an artificial intelligence acceleration card scheduling device based on domestic CPU and OS, It is characterized in that The dispatch center monitors the number of remaining connections in the TCP connection pool. When the number of remaining connections in the TCP connection pool is too large within a period of time, the dispatch center will reduce the number of TCP connection pools, otherwise it will increase the number of TCP connection pools.

8. According to claim 7, an artificial intelligence acceleration card scheduling device based on domestic CPU and OS, It is characterized in that The dispatch center collects the number of remaining connections in the TCP connection pool every 1 minute. If the average number of remaining connections within 5 minutes is greater than 10, the TCP connection pool is reduced by 10. Correspondingly, if the number of remaining connections is 0 within 5 minutes, it is increased by 10.

Citation Information

Patent Citations

  • Embedded accelerator card

    CN103955390A

  • Distributed container cluster framework resource management method based on domestic CPU and operating system

    CN108829509A

  • Systems and methods for executing cryptographic operations across different types of processing hardware

    CN109906595A

  • Management system of cluster database connection pool

    CN112069237A

  • Resource allocation method and resource manager

    WO2017133351A1