Dynamic distribution method, system and device for real-time voice distribution and transfer, and medium
By using message queue technology and resource scheduling algorithms in the speech recognition system, voice recognition tasks are dynamically distributed, which solves the problems of peak delay and performance of traditional systems, and achieves efficient and stable voice distribution and transfer.
Patent Information
- Application Number
- CN202411824981.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-01-14
AI Technical Summary
Traditional voice recognition systems can cause latency and performance issues during peak or large-scale use, mainly due to the inability to effectively handle a single server or cluster when handling a large number of voice input tasks.
Using a dynamic distribution method based on message queue technology, the request information is placed into the message queue by calculating the sorting value of the task, and the resource scheduling algorithm is used to optimize the request allocation strategy to ensure that virtual machines with health meet the standards have high priority tasks and improve response efficiency and stability.
A high throughput, low latency and reliability messaging mechanism is realized, which enhances system performance and reliability, avoids delays, blockages and service crashes caused by insufficient resources, and improves system availability.
Smart Images

Figure CN119314490A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to fields such as computer technology, information technology and system engineering technology, and specifically to a dynamic distribution method, system, device and medium for real-time speech distribution and transcription. Background Art
[0002] Real-time voice distribution and transcription is the process of converting real-time input voice into text. With the development of artificial intelligence and natural language processing technology, real-time voice distribution and transcription has been widely used in various scenarios, such as intelligent customer service, voice search, assisted hearing, etc.
[0003] The core of real-time voice distribution transcription technology is speech recognition technology, which mainly relies on deep learning algorithms to convert voice signals into text results. However, in peak periods or large-scale usage, in order to ensure a balance between speed and accuracy, an efficient queuing and distribution method is needed to handle a large number of requests. In traditional speech recognition systems, a single server or cluster is usually used to handle all voice input tasks, which may cause delays and performance issues. Summary of the invention
[0004] In order to solve the delay and performance problems that may be caused when a single server or cluster is used to process large-scale voice input tasks in traditional speech recognition systems, the present application provides a dynamic distribution method, system, device and medium for real-time voice distribution and transcription. The present application is based on message queue technology, and the length of the adaptive message queue dynamically puts the request information into the message queue according to the weight level. At the same time, the resource scheduling algorithm is used to optimize the request allocation strategy to improve the overall response efficiency and stability of the real-time voice distribution and transcription scenario.
[0005] In the first aspect, the present application is implemented through the following technical solutions: A dynamic distribution method for real-time speech distribution transcription, the dynamic distribution method comprising: Get task request information; Calculate the ranking value of the task, and put the task into the message queue according to the ranking value of the task, and the smaller the ranking value of the task in the message queue, the higher the priority; The virtual machine status is updated, and the available virtual machine set is monitored to see whether there is a virtual machine that meets the health standard. If so, proceed to the next step, otherwise wait; Taking out the task with the highest priority from the message queue, and calculating the execution time of the task with the highest priority after being assigned to each virtual machine that meets the health standard; The task with the highest priority is assigned to the virtual machine with the shortest execution time for execution.
[0006] In some implementations, the obtaining of task request information specifically includes: Get the task set; Get the relevant parameters of each task in the task set, including: the weight level of the task.
[0007] In some implementations, the ranking value of the computing task specifically includes: Obtaining the upper limit value of the message queue; The ranking value of the task is calculated by the following formula: ranki=ti.level*M+ti; Among them, ranki represents the ranking value of task i, ti.level represents the weight value of task i, M represents the upper limit of the message queue, and ti represents the number of task i.
[0008] In some implementations, the virtual machine status is updated, and monitoring is performed to determine whether there is a virtual machine with a health status that meets the health standard in the available virtual machine set. If so, the subsequent steps are performed, otherwise, waiting is performed, specifically including: Obtain the set of virtual machines in the server cluster deployment environment by querying the configuration information of the load balancer; Obtaining parameters related to each virtual machine in the virtual machine set, including: memory usage of the virtual machine, CPU usage of the virtual machine, disk usage of the virtual machine, and error log records of the virtual machine; The health of the virtual machine is calculated by the following formula: hvmj=0.4*(1-vmj.cpu)+0.3*(1-vmj.sto)+0.2*(1-vmj.dk)+0.1*(1-vmj.rd); Among them, hvmj represents the health of virtual machine j, vmj.cpu represents the CPU usage of virtual machine j, vmj.sto represents the memory usage of virtual machine j, vmj.dk represents the disk usage of virtual machine j, and vmj.rd represents the error log record of virtual machine j; Acquire virtual machines in the virtual machine set whose health status meets the standard, and generate a set of virtual machines whose health status meets the standard; Determine whether there is a virtual machine in the set of virtual machines whose health meets the standard, and if so, execute the subsequent steps; otherwise, wait.
[0009] In some implementations, respectively calculating the execution time of the highest priority task after being assigned to each virtual machine that meets the health standard includes: Obtain relevant parameters of each virtual machine that meets the health standard, including: computing power of the virtual machine and bandwidth of the virtual machine; The execution time of the task with the highest priority after being assigned to the virtual machine that meets the health standard is calculated by the following formula: ertx.e=rtx.size / (rvme.ct+rvme.tw); Among them, ertx.e indicates the execution time of the highest priority task rtx after being allocated to virtual machine e for processing, rtx.size indicates the data volume of the highest priority task rtx, rvme.ct indicates the computing power of virtual machine e, and rvme.tw indicates the bandwidth of virtual machine e.
[0010] In a second aspect, the present application proposes a dynamic distribution system for real-time speech distribution and transcription, the dynamic distribution system comprising: A queuing module, wherein the queuing module is configured to perform the following process: Obtaining task request information; calculating the task ranking value, and placing the task into a message queue according to the task ranking value, wherein the smaller the task ranking value in the message queue, the higher the priority; And, a distribution scheduling module, wherein the distribution scheduling module is configured to perform the following process: The virtual machine status is updated, and it is monitored whether there is a virtual machine that meets the health standard in the available virtual machine set. If so, the subsequent steps are performed, otherwise wait; the task with the highest priority is taken from the message queue, and the execution time of the task with the highest priority after being assigned to each virtual machine that meets the health standard is calculated; the task with the highest priority is assigned to the virtual machine with the shortest execution time for execution.
[0011] In some embodiments, the queuing module further includes: The task acquisition unit is configured to perform the following processes: acquiring a task set; acquiring relevant parameters of each task in the task set, including: a weight level of the task; and a computing unit, wherein the computing unit is configured to perform the following process: Obtaining the upper limit value of the message queue; The ranking value of the task is calculated by the following formula: ranki=ti.level*M+ti; Among them, ranki represents the ranking value of task i, ti.level represents the weight value of task i, M represents the upper limit of the message queue, and ti represents the number of task i; The tasks are placed in the message queue according to the sorting values of the tasks.
[0012] In some implementations, the distribution scheduling module further includes: A status update unit, wherein the status update unit is configured to perform the following process: The virtual machine set in the server cluster deployment environment is obtained by querying the configuration information of the load balancer; the relevant parameters of each virtual machine in the virtual machine set are obtained, including: the memory usage rate of the virtual machine, the CPU usage rate of the virtual machine, the disk usage rate of the virtual machine and the error log record of the virtual machine; the health of the virtual machine is calculated by the following formula: hvmj=0.4*(1-vmj.cpu)+0.3*(1-vmj.sto)+0.2*(1-vmj.dk)+0.1*(1-vmj.rd); Among them, hvmj represents the health of virtual machine j, vmj.cpu represents the CPU usage of virtual machine j, vmj.sto represents the memory usage of virtual machine j, vmj.dk represents the disk usage of virtual machine j, and vmj.rd represents the error log record of virtual machine j; Acquire virtual machines in the virtual machine set whose health status meets the standard, and generate a set of virtual machines whose health status meets the standard; Determine whether there is a virtual machine in the set of virtual machines whose health meets the standard, and if so, execute the subsequent steps, otherwise wait; A task calculation unit, wherein the calculation unit is configured to perform the following process: Obtain relevant parameters of each virtual machine that meets the health standard, including: computing power of the virtual machine and bandwidth of the virtual machine; The execution time of the task with the highest priority after being assigned to the virtual machine that meets the health standard is calculated by the following formula: ertx.e=rtx.size / (rvme.ct+rvme.tw); Among them, ertx.e indicates the execution time of the highest priority task rtx after being allocated to virtual machine e for processing, rtx.size indicates the data volume of the highest priority task rtx, rvme.ct indicates the computing power of virtual machine e, and rvme.tw indicates the bandwidth of virtual machine e; And, a resource scheduling unit, wherein the resource scheduling unit is configured to perform the following process: The program execution command calls the virtual machine with the shortest execution time to execute the task with the highest priority.
[0013] In a third aspect, the present application proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0014] In a fourth aspect, the present application proposes a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0015] The present application proposes a dynamic distribution method, system, device and medium for real-time voice distribution and transcription, which can dynamically adjust the size of the request queue according to the actual situation; the present application can provide a high-throughput, low-latency and reliable message delivery mechanism, so that the performance and reliability of the entire system can be well guaranteed, and better adapt to the needs in different scenarios; The present application proposes a dynamic distribution method, system, device and medium for real-time voice distribution and transcription, which is based on the fact that the priority of key tasks will be continuously adjusted as the weight level changes, and can ensure that the tasks are responded to and executed in priority according to their urgency; The present application proposes a dynamic distribution method, system, device and medium for real-time voice distribution and transcription. When searching for execution virtual machine resources, the health status of each resource is calculated in advance, avoiding problems such as data delay, congestion and even service crash caused by insufficient resources, thereby enhancing the availability of the system. Compared with traditional fully intelligent scheduling technology, the present application has the advantages of simple algorithm and high timeliness, and can be used for long connection and online real-time resource scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the embodiments of the present application, constitute a part of the present application, and do not constitute a limitation on the embodiments of the present application. In the drawings: Figure 1 A schematic diagram of a dynamic distribution method flow chart provided in an embodiment of the present application; Figure 2 A block diagram of the dynamic distribution system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with examples and drawings. The illustrative implementation scheme of the present application and its description are only used to explain the present application and are not intended to limit the present application.
[0018] Embodiment 1: In traditional speech recognition systems, a single server or cluster is usually used to handle all speech input tasks, which may cause delays and performance issues. In view of this, this embodiment proposes a dynamic distribution method, system, device and medium for real-time speech distribution and transcription. The method proposed in this embodiment is based on message queue technology, and the length of the adaptive message queue dynamically puts the request information into the message queue according to the weight level. At the same time, the resource scheduling algorithm is used to optimize the request allocation strategy, thereby improving the overall response efficiency and stability of the real-time speech distribution and transcription scenario.
[0019] like Figure 1 As shown, the method proposed in this embodiment includes the following steps: Step 100: Obtain task request information.
[0020] The client schedules the server API integration interface in real time, and sends no more than 1280 bytes of voice data every 40ms as agreed, so that the server can obtain the information required for voice recognition.
[0021] Get a task set T = {t1, t2, ..., tI}, where I is the number of times the voice task is sent, and ti represents the number of task i; Get task-related parameters, including: the weight level of task i. The weight level is defined by the server. The client carries the weight identifier when sending voice. The weight level of task i in this voice distribution transcription corresponds to the weight value ti.level.
[0022] Step 200, calculate the ranking value of the task, and put the task into the message queue according to the ranking value of the task. Specifically including: First, obtain the upper limit value M of the message queue, and execute the following algorithm to calculate the ranking value of the task: ranki=ti.level *M+ti, where ranki represents the ranking value of task i, and ti.level represents the weight value of task i.
[0023] Then, according to the calculated ranking value, the task is placed in the message queue RT{rt1, rt2, ..., rtZ} through the ActiveMQ message agent JMS connection, where Z represents the number of tasks in the message queue and rtz represents task z in the message queue. It should be noted that the smaller the task ranking value in the message queue, the higher the priority.
[0024] Step 300: Update the virtual machine status and monitor whether there is a virtual machine that meets the health standard in the available virtual machine set. If there is, proceed to the subsequent steps, otherwise wait. Specifically including: The virtual machine set VM={vm1, vm2, ..., vmJ} in the server cluster deployment environment is obtained by querying the configuration information of the load balancer, where J is the number of virtual machines and vmj represents virtual machine j, that is, the virtual machine numbered j.
[0025] Get virtual machine related parameters, including: memory usage vmj.sto of virtual machine j, CPU usage vmj.cpu of virtual machine j, disk usage vmj.dk of virtual machine j, error log record vmj.rd of virtual machine j, where j=1, 2…,J.
[0026] The following algorithm is used to calculate the health of the virtual machine: hvmj=0.4*(1-vmj.cpu)+0.3*(1-vmj.sto)+0.2*(1-vmj.dk)+0.1*(1-vmj.rd) Among them, hvmj represents the health of virtual machine j.
[0027] Let the health standard value of the virtual machine be rv. The health standard value of the virtual machine can be set by the server administrator according to the server cluster resource situation. Let the set of virtual machines that meet the health standard be RVM{rvm1,rvm2,…,rvmE}, where E represents the number of virtual machines that meet the health standard, and rvme represents the virtual machine e that meets the health standard.
[0028] If there is at least one virtual machine in RVM, execute the subsequent steps, otherwise wait.
[0029] Step 400: Take out the key task from the message queue, and calculate the execution time of each key task after being assigned to each virtual machine that meets the health standard. The key task is the task with the highest priority in the message queue.
[0030] Specifically, the task with the smallest order is taken out from the message queue and set as rtx, and the data size rtx.size of the task rtx is obtained through the getContentLength() method provided by the HttpServletRequest object.
[0031] Obtain the RVM-related parameters of the virtual machine set that meets the health standard, including the computing capacity rvme.ct of virtual machine e and the bandwidth rvme.tw of virtual machine e, where e = 1, 2…, E; obtain the association relationship between task rtx and virtual machine e; Take any virtual machine from the healthy virtual machine set RVM and set it as rvme; The execution time ertx.e of the calculation task rtx after being assigned to the virtual machine rvme is calculated as follows: ertx.e=rtx.size / (rvme.ct+rvme.tw). Through the above process, we can calculate the execution time of task rtx assigned to all virtual machines in the healthy virtual machine set RVM.
[0032] Step 500: Allocate the critical task to the virtual machine with the shortest execution time for execution.
[0033] Through step 400, the execution time of task rtx of each virtual machine in the healthy virtual machine set is obtained, and the virtual machine that completes the task earliest, that is, the virtual machine with the shortest execution time, is found out, and the shell command is executed by the program to call the virtual machine to execute the key task rtx.
[0034] The method proposed in this embodiment can dynamically adjust the size of the request queue according to the actual situation, and can provide a high-throughput, low-latency and reliable message delivery mechanism, so that the performance and reliability of the entire system can be well guaranteed, and better adapt to the needs of different scenarios. This application is based on the fact that the priority of key tasks will be continuously adjusted as the weight level changes, and it can prioritize the response execution of tasks according to their urgency. In addition, when looking for execution virtual machine resources, this application calculates the health status of each resource in advance, avoiding problems such as data delays, congestion, and even service crashes caused by insufficient resources, thereby enhancing the availability of the system.
[0035] Based on the same technical concept as above, this embodiment also proposes a dynamic distribution method, system, device and medium for real-time voice distribution transcription, such as Figure 2 As shown, the system proposed in this embodiment includes: A queuing module is configured to perform the following process: Get task request information; calculate the task ranking value, and put the task into the message queue according to the task ranking value. The smaller the task ranking value in the message queue, the higher the priority; And, a distribution scheduling module, the distribution scheduling module is configured to perform the following process: The virtual machine status is updated, and the available virtual machine set is monitored to see if there is a virtual machine that meets the health standard. If so, the subsequent steps are carried out, otherwise wait; the key task is taken from the message queue, and the execution time of the key task after being assigned to each virtual machine that meets the health standard is calculated, and the key task is assigned to the virtual machine with the shortest execution time. Among them, the key task refers to the task with the highest priority in the message queue.
[0036] Furthermore, the queuing module also includes: A task acquisition unit, wherein the task acquisition unit is configured to perform the following process: Get a task set T = {t1, t2, ..., tI}, where I is the number of times the voice task is sent, and ti represents the number of task i; Get task-related parameters, including: the weight level of task i. The weight level is defined by the server. The client carries the weight identifier when sending voice. The weight level of task i in this voice distribution transcription corresponds to the weight value ti.level. and a computing unit configured to perform the following process: First, obtain the upper limit value M of the message queue, and execute the following algorithm to calculate the ranking value of the task: ranki=ti.level *M+ti, where ranki represents the ranking value of task i, and ti.level represents the weight value of task i.
[0037] Then, according to the calculated ranking value, the task is placed in the message queue RT{rt1, rt2, ..., rtZ} through the ActiveMQ message agent JMS connection, where Z represents the number of tasks in the message queue and rtz represents task z in the message queue. It should be noted that the smaller the task ranking value in the message queue, the higher the priority.
[0038] Furthermore, the distribution scheduling module also includes: A state update unit, wherein the state update unit is configured to perform the following process: The virtual machine set VM={vm1, vm2, ..., vmJ} in the server cluster deployment environment is obtained by querying the configuration information of the load balancer, where J is the number of virtual machines and vmj represents virtual machine j, that is, the virtual machine numbered j.
[0039] Get virtual machine related parameters, including: memory usage vmj.sto of virtual machine j, CPU usage vmj.cpu of virtual machine j, disk usage vmj.dk of virtual machine j, error log record vmj.rd of virtual machine j, where j=1, 2…,J.
[0040] The following algorithm is used to calculate the health of the virtual machine: hvmj=0.4*(1-vmj.cpu)+0.3*(1-vmj.sto)+0.2*(1-vmj.dk)+0.1*(1-vmj.rd) Among them, hvmj represents the health of virtual machine j.
[0041] Let the health standard value of the virtual machine be rv. The health standard value of the virtual machine can be set by the server administrator according to the server cluster resource situation. Let the set of virtual machines that meet the health standard be RVM{rvm1,rvm2,…,rvmE}, where E represents the number of virtual machines that meet the health standard, and rvme represents the virtual machine e that meets the health standard.
[0042] If there is at least one virtual machine in RVM, execute the subsequent steps, otherwise wait; The task trial calculation unit is configured to perform the following process: Take out the task with the smallest order from the message queue, set it as rtx, and obtain the data size rtx.size of the task rtx through the getContentLength() method provided by the HttpServletRequest object.
[0043] Get the RVM-related parameters of the healthy virtual machine set, including the computing capacity rvme.ct of virtual machine e and the bandwidth rvme.tw of virtual machine e, where e = 1, 2…, E; get the support relationship between task rtx and virtual machine e; Take any virtual machine from the healthy virtual machine set RVM and set it as rvme; The execution time ertx.e of the calculation task rtx after being assigned to the virtual machine rvme is calculated as follows: ertx.e=rtx.size / (rvme.ct+rvme.tw). Through the above process, we can calculate the execution time of task rtx assigned to all virtual machines in the healthy virtual machine set RVM; And, a resource scheduling unit, the resource scheduling unit is configured to perform the following process: The shell command is executed by the program to call the virtual machine with the shortest execution time to execute the critical task rtx.
[0044] Embodiment 2: This embodiment further illustrates the method proposed in the above embodiment by using an example.
[0045] Assume that multiple clients use the speech recognition API for voice input at the same time. The server first obtains the information required for speech recognition. The client calls the server API integration interface in real time and sends no more than 1280 bytes of voice data every 40ms as agreed, as shown in Table 1 below.
[0046] Table 1
[0047] Knowing that the upper limit of the message queue is 1000, the server configures this data in the parameter library.
[0048] In addition, a server cluster has available virtual machines numbered 1 to 6. The resource usage, processing capacity and bandwidth of virtual machines vm1, vm2, ..., vm6 are shown in Table 2 below.
[0049] Table 2
[0050] The health level of the virtual machine ranges from 0 to 1. The health level is set to 0.2. The server configures this data in the parameter library.
[0051] Based on this, this embodiment uses the method proposed in the above embodiment to perform processing, and the specific process is as follows: S1, obtain task request information: obtain task set T = {t1, t2, t3}, obtain task related parameters, including: t1. level = 3, t2. level = 2, t3. level = 1, t1. size = 1200, t2. size = 1100, t3. size = 1000.
[0052] S2, calculate the sorting value of the task, and put the task into the message queue according to the sorting value of the task: First obtain the message queue upper limit value M=1000.
[0053] Calculate the ranking value of the task: rank1=3*1000+1=3001, so the ranking value of task t1 is 3001.
[0054] rank2=2*1000+2=2002, so the ranking value of task t2 is 2002.
[0055] rank3=1*1000+3=1003, so the ranking value of task t3 is 1003.
[0056] According to the sorting result, the task is put into the message queue RT, that is, RT{t3, t2, t1}.
[0057] S3: Update the virtual machine status and monitor whether there is a virtual machine that meets the health standard. If so, proceed to the next step; otherwise, wait: The virtual machine set VM={vm1, vm2, ..., vm6} is obtained by querying the configuration information of the load balancer.
[0058] Get virtual machine related parameters: memory usage vmj.sto of virtual machine j, CPU usage vmj.cpu of virtual machine j, disk usage vmj.dk of virtual machine j, disk usage vmj.dk of virtual machine j, error log record vmj.rd of virtual machine j, where j = 1, 2…,6.
[0059] Calculate the health of each virtual machine hvm: hvm1=0.4*(1-0.6)+0.3*(1-0.87)+0.2*(1-0.55)+0.1*(1-0.2)=0.369 hvm2=0.4*(1-0.7)+0.3*(1-0.9)+0.2*(1-0.7)+0.1*(1-0.35)=0.275 hvm3=0.4*(1-0.98)+0.3*(1-0.95)+0.2*(1-0.95)+0.1*(1-0.4)=0.093 hvm4=0.4*(1-0.96)+0.3*(1-0.97)+0.2*(1-0.98)+0.1*(1-0.7)=0.059 hvm5=0.4*(1-0.4)+0.3*(1-0.7)+0.2*(1-0.45)+0.1*(1-0.35)=0.505 hvm6=0.4*(1-0.65)+0.3*(1-0.75)+0.2*(1-0.55)+0.1*(1-0.45)=0.36 The health standard value obtained is 0.2.
[0060] The set of virtual machines that meet the health standards RVM {vm1, vm2, vm5, vm6}. If there are virtual machines in the set of virtual machines that meet the health standards, then execute the subsequent steps, otherwise wait.
[0061] S4, obtain the key task from the message queue, and calculate the execution time of the key task after it is assigned to each virtual machine that meets the health standard: Take out the critical task from RT, that is, get the task t3 with the smallest order in the message queue through the message function.
[0062] Get the data size of task t3, which is 1000 Byte.
[0063] Get the RVM parameters of the healthy virtual machine set: vm1.ct=1000, vm1.tw=400, vm2.ct=1200, vm2.tw=400, vm5.ct=1800, vm5.tw=600, vm6.ct=2000, vm6.tw=500; The processing time ertz,e after calculating task t3 assigned to each virtual machine in RVM is calculated as follows: ert3,1=t3.size / (rvm1.ct+rvm1.tw)=1000 / (1000+400)=0.71; ert3,2=t3.size / (rvm2.ct+rvm2.tw)=1000 / (1200+400)=0.62; ert3,5=t3.size / (rvm5.ct+rvm5.tw)=1000 / (1800+600)=0.41; ert3,6=t3.size / (rvm6.ct+rvm6.tw)=1000 / (2000+500)=0.4.
[0064] S5, assign the critical task to the virtual machine with the shortest execution time: According to the calculation results of the execution time assigned to each virtual machine according to task t3, the execution time of vm1 is 0.71, the execution time of vm2 is 0.62, the execution time of vm5 is 0.41, and the execution time of vm6 is 0.4. Finally, task t3 is executed by calling the virtual machine vm6 that can complete the task earliest through the program execution shell command.
[0065] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0066] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0067] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0069] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A dynamic distribution method for real-time speech distribution transcription, characterized in that: The dynamic distribution method includes: Get task request information; Calculate the ranking value of the task, and put the task into the message queue according to the ranking value of the task, and the smaller the ranking value of the task in the message queue, the higher the priority; The virtual machine status is updated, and the available virtual machine set is monitored to see whether there is a virtual machine that meets the health standard. If so, proceed to the next step, otherwise wait; Taking out the task with the highest priority from the message queue, and calculating the execution time of the task with the highest priority after being assigned to each virtual machine that meets the health standard; The task with the highest priority is assigned to the virtual machine with the shortest execution time for execution.
2. A dynamic distribution method for real-time speech distribution transcription according to claim 1, characterized in that: The task request information obtained specifically includes: Get the task set; Get the relevant parameters of each task in the task set, including: the weight level of the task.
3. A dynamic distribution method for real-time speech distribution transcription according to claim 1, characterized in that: The ranking value of the computing task specifically includes: Obtaining the upper limit value of the message queue; The ranking value of the task is calculated by the following formula: ranki=ti.level*M+ti; Among them, ranki represents the ranking value of task i, ti.level represents the weight value of task i, M represents the upper limit of the message queue, and ti represents the number of task i.
4. A dynamic distribution method for real-time speech distribution transcription according to claim 1, characterized in that: The virtual machine status is updated, and whether there is a virtual machine with a health status that meets the standard in the available virtual machine set is monitored. If so, the subsequent steps are performed, otherwise, waiting is performed, which specifically includes: Obtain the set of virtual machines in the server cluster deployment environment by querying the configuration information of the load balancer; Obtaining parameters related to each virtual machine in the virtual machine set, including: memory usage of the virtual machine, CPU usage of the virtual machine, disk usage of the virtual machine, and error log records of the virtual machine; The health of the virtual machine is calculated by the following formula: hvmj=0.4*(1-vmj.cpu)+0.3*(1-vmj.sto)+0.2*(1-vmj.dk)+0.1*(1-vmj.rd); Among them, hvmj represents the health of virtual machine j, vmj.cpu represents the CPU usage of virtual machine j, vmj.sto represents the memory usage of virtual machine j, vmj.dk represents the disk usage of virtual machine j, and vmj.rd represents the error log record of virtual machine j; Acquire virtual machines in the virtual machine set whose health status meets the standard, and generate a set of virtual machines whose health status meets the standard; Determine whether there is a virtual machine in the set of virtual machines whose health meets the standard, and if so, execute the subsequent steps; otherwise, wait.
5. A dynamic distribution method for real-time speech distribution transcription according to claim 1, characterized in that: The respectively calculating the execution time of the task with the highest priority after being assigned to each virtual machine that meets the health standard specifically includes: Obtain relevant parameters of each virtual machine that meets the health standard, including: computing power of the virtual machine and bandwidth of the virtual machine; The execution time of the task with the highest priority after being assigned to the virtual machine that meets the health standard is calculated by the following formula: ertx.e=rtx.size / (rvme.ct+rvme.tw); Among them, ertx.e indicates the execution time of the highest priority task rtx after being allocated to virtual machine e for processing, rtx.size indicates the data volume of the highest priority task rtx, rvme.ct indicates the computing power of virtual machine e, and rvme.tw indicates the bandwidth of virtual machine e.
6. A dynamic distribution system for real-time speech distribution and transcription, characterized in that: The dynamic distribution system comprises: A queuing module, wherein the queuing module is configured to perform the following process: Obtaining task request information; calculating the task ranking value, and placing the task into a message queue according to the task ranking value, wherein the smaller the task ranking value in the message queue, the higher the priority; And, a distribution scheduling module, wherein the distribution scheduling module is configured to perform the following process: The virtual machine status is updated, and it is monitored whether there is a virtual machine that meets the health standard in the available virtual machine set. If so, the subsequent steps are performed, otherwise wait; the task with the highest priority is taken from the message queue, and the execution time of the task with the highest priority after being assigned to each virtual machine that meets the health standard is calculated; the task with the highest priority is assigned to the virtual machine with the shortest execution time for execution.
7. A dynamic distribution system for real-time speech distribution and transcription according to claim 6, characterized in that: The queuing module also includes: The task acquisition unit is configured to perform the following processes: acquiring a task set; acquiring relevant parameters of each task in the task set, including: a weight level of the task; and a computing unit, wherein the computing unit is configured to perform the following process: Obtaining the upper limit value of the message queue; The ranking value of the task is calculated by the following formula: ranki=ti.level*M+ti; Among them, ranki represents the ranking value of task i, ti.level represents the weight value of task i, M represents the upper limit of the message queue, and ti represents the number of task i; The tasks are placed in the message queue according to the sorting values of the tasks.
8. A dynamic distribution system for real-time speech distribution and transcription according to claim 6, characterized in that: The distribution scheduling module also includes: A status update unit, wherein the status update unit is configured to perform the following process: The virtual machine set in the server cluster deployment environment is obtained by querying the configuration information of the load balancer; the relevant parameters of each virtual machine in the virtual machine set are obtained, including: the memory usage rate of the virtual machine, the CPU usage rate of the virtual machine, the disk usage rate of the virtual machine and the error log record of the virtual machine; the health of the virtual machine is calculated by the following formula: hvmj=0.4*(1-vmj.cpu)+0.3*(1-vmj.sto)+0.2*(1-vmj.dk)+0.1*(1-vmj.rd); Among them, hvmj represents the health of virtual machine j, vmj.cpu represents the CPU usage of virtual machine j, vmj.sto represents the memory usage of virtual machine j, vmj.dk represents the disk usage of virtual machine j, and vmj.rd represents the error log record of virtual machine j; Acquire virtual machines in the virtual machine set whose health status meets the standard, and generate a set of virtual machines whose health status meets the standard; Determine whether there is a virtual machine in the set of virtual machines whose health meets the standard, and if so, execute the subsequent steps, otherwise wait; A task calculation unit, wherein the calculation unit is configured to perform the following process: Obtain relevant parameters of each virtual machine that meets the health standard, including: computing power of the virtual machine and bandwidth of the virtual machine; The execution time of the task with the highest priority after being assigned to the virtual machine that meets the health standard is calculated by the following formula: ertx.e=rtx.size / (rvme.ct+rvme.tw); Among them, ertx.e indicates the execution time of the highest priority task rtx after being allocated to virtual machine e for processing, rtx.size indicates the data volume of the highest priority task rtx, rvme.ct indicates the computing power of virtual machine e, and rvme.tw indicates the bandwidth of virtual machine e; And, a resource scheduling unit, wherein the resource scheduling unit is configured to perform the following process: The program execution command calls the virtual machine with the shortest execution time to execute the task with the highest priority.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
A service logic execution system and method based on a dynamic language
CN109739482A
Energy-saving scheduling method for improving reliability of multiple workflows
CN110908772A
Task scheduling method and device for heterogeneous fusion system
CN111367644A
Fault positioning method and device in micro-service environment and readable storage medium
CN117041028A
Task scheduling method and device, processing equipment and readable storage medium
CN117687759A