Real-time comprehensive reasoning and drawing method based on scheduling mode LCM (Liquid Crystal Module)
Through the LCM real-time comprehensive inference drawing method based on scheduling mode, the problems of low machine usage efficiency and slow AI inference speed in AI drawing are solved, and the inference speed and machine usage efficiency are improved, meeting the needs of real-time drawing.
Patent Information
- Application Number
- CN202411561033.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-18
AI Technical Summary
The low efficiency of machine usage and slow AI inference in AI drawings lead to low capacity utilization of computing equipment.
The LCM real-time comprehensive inference drawing method based on the scheduling mode is adopted to asynchronously schedule client requests through the scheduling platform to achieve efficient allocation and utilization of inference machines, and improve inference speed and machine usage efficiency.
It improves the speed of AI drawing reasoning and system throughput, meets the real-time drawing needs of students and designers, and improves the capacity utilization rate of computing devices.
Smart Images

Figure CN119477658A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of scheduling technology, and in particular to a real-time comprehensive reasoning drawing method based on a scheduling mode LCM. Background Art
[0002] Stable Diffusion is an open source generative AI tool that generates images using AI models by inputting text or images. Its powerful generative AI capabilities have had a significant impact on the Internet industry and are widely used in designers, image processing and other fields. There has been a wave of learning Stable Diffusion drawing in schools or companies. The common solution adopted in the industry is to independently install Stable Diffusion on teaching computers and provide it to students or corporate employees for learning and use. However, the process of setting up and installing Stable Diffusion is cumbersome and requires computing devices to have graphics cards with good capabilities. If it cannot be platformized to provide unified generative AI capabilities to the outside world, it means that the capacity utilization rate of computing devices will be low.
[0003] Therefore, the prior art has defects and needs to be improved. Summary of the invention
[0004] The technical problem to be solved by the present invention is: to provide a real-time comprehensive reasoning drawing method based on the scheduling mode LCM, to solve the problems of machine utilization efficiency and slow AI reasoning speed in AI drawing, and to improve the reasoning speed and increase the machine utilization efficiency.
[0005] The technical solution of the present invention is as follows: a real-time comprehensive reasoning drawing method based on the scheduling mode LCM is provided, comprising the following steps.
[0006] S1: The client applies for an inference machine from the scheduling platform. The scheduling platform performs asynchronous scheduling on the client, puts the client's request into the queue, and returns the queue information to the client.
[0007] S2: The client polls the scheduling platform for scheduling results to check whether the inference machine is scheduled; if it is, the scheduling platform returns the inference machine information to the client and enters step S3; if it is not, repeat step S2.
[0008] S3: The client carries the task token and establishes a persistent socket connection with the verification platform. After the task token carried by the client is verified by the verification platform, the client obtains the required inference machine information. The verification platform establishes a persistent socket connection with the inference machine cluster and sends the information of the client carrying the task token to the idle inference machines in the inference machine cluster.
[0009] S4: The client carrying the task token establishes a socket persistent connection with an idle inference machine in the inference machine cluster, and the inference machine performs inference and real-time drawing based on the client's inference information.
[0010] When idle computing power appears on an inference machine in the inference machine cluster, the idle computing power information is returned to the scheduling platform.
[0011] The scheduling platform allocates an inference machine according to the client's IP address information or the client's software serial number. The verification platform sends the client's information to the inference machine cluster according to the client's IP address information or the client's software serial number. The inference machine cluster establishes a long socket connection with the client according to the client's IP address information or the client's software serial number.
[0012] A master-slave Nginx traffic access layer is built in the inference machine cluster. The stability of the Nginx traffic access layer is ensured by mapping the virtual IP address. When the master Nginx fails, it automatically switches to the backup Nginx, thereby enabling Nginx to provide uninterrupted services and improving the stability of the overall system traffic access layer service. The virtual IP address is mapped to the public network for external client access.
[0013] When the number of clients increases significantly, the inference machine cluster is expanded horizontally to add inference machines, the mirrored machines are installed, started and automatically online, and added to the scheduling platform.
[0014] In step S1, it also includes the client reporting the required reasoning information to the scheduling platform; in step S3, it also includes: the scheduling platform reporting the required reasoning information reported by the client to the reasoning machine.
[0015] In step S4, when the client establishes a persistent socket connection to an idle inference machine, the idle inference machine verifies whether the client is the client information carrying the task token sent by the verification platform; if so, the idle inference machine establishes a persistent socket connection with the client; if not, it means that the idle inference machine is not the inference machine assigned to the client, and the client looks for other idle inference machines for verification.
[0016] By adopting the above scheme, the present invention provides a real-time comprehensive reasoning drawing method based on the scheduling mode LCM, adopts the scheduling mode server interaction to realize real-time drawing queue acceleration, establishes a reliable and scalable reasoning drawing service cluster to improve system throughput, concurrency, and accelerate AI drawing reasoning, so as to meet the requirements of students or designers to immediately infer the expected AI image effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0018] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0019] See also Figure 1 The present invention provides a real-time comprehensive reasoning drawing method based on the scheduling mode LCM, which includes the following steps.
[0020] S1: The client applies for an inference machine from the scheduling platform. The scheduling platform performs asynchronous scheduling on the client, puts the client's request into the queue, and returns the queue information to the client.
[0021] S2: The client polls the scheduling platform for scheduling results to check whether the inference machine is scheduled; if it is, the scheduling platform returns the inference machine information to the client and enters step S3; if it is not, repeat step S2.
[0022] S3: The client carries the task token and establishes a persistent socket connection with the verification platform. After the task token carried by the client is verified by the verification platform, the client obtains the required inference machine information. The verification platform establishes a persistent socket connection with the inference machine cluster and sends the information of the client carrying the task token to the idle inference machines in the inference machine cluster.
[0023] S4: The client carrying the task token establishes a socket persistent connection with an idle inference machine in the inference machine cluster, and the inference machine performs inference and real-time drawing based on the client's inference information.
[0024] The client queues up in advance through the scheduling system to see if there are idle inference machines. If no idle inference machines are polled, the client continues to poll. If an idle inference machine is polled, the client carries the task token to verify with the verification platform. After the verification is passed, the client obtains the inference machine information, and the verification platform also sends the client information to the corresponding idle inference machine; the client establishes a long connection with the inference machine, and the inference machine performs inference and real-time drawing based on the client's inference information. Since the client's inference needs are scheduled through the scheduling platform, a large number of clients are prevented from accessing the inference resource cluster in a concentrated manner, which can effectively avoid congestion; and the verification platform is used for verification, and the task tokens of the client are further checked to fully avoid invalid tasks from entering the inference machine for inference calculations, thereby avoiding the loss of computing power of the inference machine.
[0025] When idle computing power appears in the inference machine in the inference machine cluster, the idle computing power information is returned to the scheduling platform so that the scheduling platform can obtain the information of the idle inference machine in a timely manner.
[0026] The scheduling platform allocates the inference machine according to the client's IP address information or the client's software serial number. The verification platform sends the client's information to the inference machine cluster according to the client's IP address information or the client's software serial number. The inference machine cluster establishes a long socket connection with the client according to the client's IP address information or the client's software serial number. The client is tracked by the client's IP address information or the client's software serial number to avoid confusion when the client connects to the scheduling platform, verification platform, and inference machine.
[0027] A master-slave Nginx traffic access layer is built in the inference machine cluster. The stability of the Nginx traffic access layer is ensured by mapping the virtual IP address. When the master Nginx fails, it automatically switches to the backup Nginx, thereby enabling Nginx to provide uninterrupted services and improving the stability of the overall system traffic access layer service. The virtual IP address is mapped to the public network for external client access.
[0028] When the number of clients increases significantly, the inference machine cluster is expanded horizontally to add inference machines, the mirrored machines are installed, started and automatically online, and added to the scheduling platform.
[0029] In step S1, the client reports the inference information to be performed to the scheduling platform; in step S3, the scheduling platform reports the inference information to be performed reported by the client to the inference machine. By pre-storing the inference information on the scheduling platform, the scheduling platform can send the inference information to the inference machine in advance, so that the inference machine can perform inference calculations on the client's inference information in advance, thereby reducing the idle time of the inference machine and improving the utilization rate of the inference machine.
[0030] In step S4, when the client establishes a socket persistent connection to an idle inference machine, the idle inference machine verifies whether the client is the client information carrying the task token sent by the verification platform; if so, the idle inference machine establishes a socket persistent connection with the client; if not, it means that the idle inference machine is not the inference machine assigned to the client, and the client looks for other idle inference machines for verification. The inference machine verifies whether the client is the assigned client to avoid incorrect connection to the client.
[0031] In summary, the present invention provides a real-time comprehensive reasoning and drawing method based on the scheduling mode LCM, which adopts the scheduling mode server interaction to realize real-time drawing queue acceleration, establishes a reliable and scalable reasoning and drawing service cluster to improve system throughput, concurrency, and accelerate AI drawing reasoning, so as to meet the requirements of students or designers to immediately reason out the expected AI image effect.
[0032] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A real-time comprehensive reasoning and drawing method based on the scheduling mode LCM, characterized in that: The following steps are involved: S1: The client requests an inference machine from the scheduling platform. The scheduling platform performs asynchronous scheduling on the client, puts the client's request into a queue, and returns queue information to the client. S2: The client polls the scheduling platform for scheduling results to check whether the inference machine is scheduled; if it is, the scheduling platform returns the inference machine information to the client and goes to step S3; if it is not, repeat step S2; S3: The client carries the task token and establishes a persistent socket connection with the verification platform. After the task token carried by the client is verified by the verification platform, the client obtains the required inference machine information. The verification platform establishes a persistent socket connection with the inference machine cluster and sends the information of the client carrying the task token to the idle inference machines in the inference machine cluster. S4: The client carrying the task token establishes a socket persistent connection with an idle inference machine in the inference machine cluster, and the inference machine performs inference and real-time drawing based on the client's inference information.
2. According to the method of claim 1, the method is characterized in that: When idle computing power appears on an inference machine in the inference machine cluster, the idle computing power information is returned to the scheduling platform.
3. The method for real-time comprehensive reasoning and drawing based on the scheduling mode LCM according to claim 1 is characterized in that: The scheduling platform allocates an inference machine according to the client's IP address information or the client's software serial number. The verification platform sends the client's information to the inference machine cluster according to the client's IP address information or the client's software serial number. The inference machine cluster establishes a long socket connection with the client according to the client's IP address information or the client's software serial number.
4. The method for real-time comprehensive reasoning and drawing based on the scheduling mode LCM according to claim 1 is characterized in that: A master-slave Nginx traffic access layer is built in the inference machine cluster. The stability of the Nginx traffic access layer is ensured by mapping the virtual IP address. When the master Nginx fails, it automatically switches to the backup Nginx, thereby enabling Nginx to provide uninterrupted services and improving the stability of the overall system traffic access layer service. The virtual IP address is mapped to the public network for external client access.
5. The method for real-time comprehensive reasoning and drawing based on the scheduling mode LCM according to claim 1 is characterized in that: When the number of clients increases significantly, the inference machine cluster is expanded horizontally to add inference machines, the mirrored machines are installed, started and automatically online, and added to the scheduling platform.
6. The method for real-time comprehensive reasoning and drawing based on the scheduling mode LCM according to claim 1 is characterized in that: In step S1, it also includes the client reporting the required reasoning information to the scheduling platform; in step S3, it also includes: the scheduling platform reporting the required reasoning information reported by the client to the reasoning machine.
7. The method for real-time comprehensive reasoning and drawing based on scheduling mode LCM according to claim 1 is characterized in that: In step S4, when the client establishes a persistent socket connection to an idle inference machine, the idle inference machine verifies whether the client is the client information carrying the task token sent by the verification platform; if so, the idle inference machine establishes a persistent socket connection with the client; if not, it means that the idle inference machine is not the inference machine assigned to the client, and the client looks for other idle inference machines for verification.
Citation Information
Patent Citations
Information interaction method and system of WebRTC client, storage medium and equipment
CN116366613A
AI drawing software page platformization system
CN118210623A