Method, device and computer equipment for implementing load balancing in speech recognition system

By querying the task execution list in the speech recognition system, the server with the smallest CPU usage is selected to process the speech recognition task and update the information in real time, which solves the problem of low load balancing efficiency in the existing technology and achieves fast, real-time and efficient load balancing. , which improves the system’s responsiveness.

CN110428840BActive Publication Date: 2024-09-24PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910655562.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-19
Publication Date
2024-09-24
Estimated Expiration
2039-07-19

AI Technical Summary

Technical Problem

The load balancing method in the existing speech recognition system is time-consuming and low in efficiency, making it difficult to quickly and real-time allocate speech recognition tasks to available servers.

Method used

By querying the task execution list including the numbers, execution task lists and CPU usage of all speech recognition servers, the server with the smallest CPU usage is selected to process the speech recognition task, and the CPU usage information in the task execution list is updated in real time.

Benefits of technology

It achieves fast, real-time and efficient load balancing in the speech recognition system, avoids crashes caused by excessive server load, and improves the response speed and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The present invention discloses a method for implementing load balancing in a speech recognition system, the method comprising: receiving a first speech recognition task sent by a user; querying the CPU usage of each speech recognition server in a preset task execution list; sending the first speech recognition task to the first speech recognition server with the smallest first CPU usage; receiving the instant second CPU usage fed back by the first speech recognition server and updating it to the task execution list. The present invention also provides a device, server and computer-readable storage medium for implementing load balancing in a speech recognition system. The method, device, computer equipment and computer-readable storage medium for implementing load balancing in a speech recognition system provided by the present invention can query the dynamically updated task execution list, and then select the speech recognition server with the smallest CPU usage to execute the received speech recognition task, thereby realizing load balancing quickly, in real time and efficiently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a method, device, computer equipment and computer-readable storage medium for implementing load balancing in a speech recognition system. Background Art

[0002] With the rapid development of speech recognition technology, many companies have provided special speech recognition service functions, for example, combining speech recognition functions with other application APPs to achieve the control of related functions of other application APPs according to the received voice commands. For enterprises, in order to provide voice services to a large number of users, it is necessary to assume a lot of speech recognition servers. Since dozens or hundreds of voice servers are set up, in order to achieve load balancing of speech recognition tasks for a large number of users, the prior art usually uses the method of setting up a voice access server, and then the voice access server adopts a polling method to achieve load balancing between each speech recognition server, and during the polling process, the voice access server needs to calculate the load of each speech recognition server according to a preset more complex load balancing algorithm to determine whether the speech recognition server is available, and the speech recognition task can only be issued when it is determined that the voice server is available. Therefore, the existing load balancing method is time-consuming and inefficient. Summary of the invention

[0003] In view of this, the present invention proposes a method, apparatus, computer device and computer-readable storage medium for implementing load balancing in a speech recognition system. After receiving a user's speech recognition task, the method can query a task execution list including the numbers of all speech recognition servers, a list of execution tasks and CPU usage rates, and then select a speech recognition server with the lowest CPU usage rate to execute the speech recognition task. The task execution status and CPU usage rate fed back by the speech recognition server will also be updated to the task execution list, thereby realizing fast, real-time and efficient load balancing in the speech recognition system.

[0004] First, to achieve the above-mentioned purpose, the present invention provides a method for implementing load balancing in a speech recognition system, the method comprising:

[0005] Receive a first voice recognition task sent by a user; query the CPU usage of each voice recognition server in a preset task execution list, wherein the task execution list includes list information of all voice recognition servers, and the list information includes: the number of the voice recognizer, the list of voice recognition tasks being executed, and the CPU usage; when it is found that the first CPU usage of the first voice recognition server is the smallest, send the first voice recognition task to the first voice recognition server; receive a message from the first voice recognition server that the first voice recognition task is being processed and the instant second CPU usage of the first voice recognition server; update the second CPU usage and the first voice recognition task to the list information corresponding to the first voice recognition server in the task execution list.

[0006] Optionally, the method also includes: receiving a message that the first speech recognition server has completed the second speech recognition task and the instantaneous third CPU usage of the first speech recognition server; and updating the third CPU usage and the second speech recognition task to the list information corresponding to the first speech recognition server in the task execution list.

[0007] Optionally, the method further includes: when multiple minimum CPU usage rates are found out through query, randomly selecting a speech recognition server from the multiple speech recognition servers with the minimum CPU usage rates to process the first speech recognition task.

[0008] Optionally, the method further includes: when it is found that the CPU usage rate of each speech recognition server in the task execution list is higher than a preset first threshold, refusing access to the speech recognition task and sending a busy service prompt to the user.

[0009] In addition, to achieve the above-mentioned purpose, the present invention also provides a device for implementing load balancing in a speech recognition system, the device comprising:

[0010] A receiving module is used to receive a first voice recognition task sent by a user; a query module is used to query the CPU usage of each voice recognition server in a preset task execution list, wherein the task execution list includes list information of all voice recognition servers, and the list information includes: the number of the voice recognizer, the list of voice recognition tasks being executed, and the CPU usage; a sending module is used to send the first voice recognition task to the first voice recognition server when it is found that the first CPU usage of the first voice recognition server is the smallest; the receiving module is also used to receive a message from the first voice recognition server that the first voice recognition task is being processed and the instant second CPU usage of the first voice recognition server; an updating module is used to update the second CPU usage and the first voice recognition task to the list information corresponding to the first voice recognition server in the task execution list.

[0011] Optionally, the receiving module is also used to receive a message that the first speech recognition server has completed the second speech recognition task and the instantaneous third CPU usage rate of the first speech recognition server; the updating module is also used to update the third CPU usage rate and the second speech recognition task to the list information corresponding to the first speech recognition server in the task execution list.

[0012] Optionally, the sending module is further configured to randomly select a speech recognition server from the multiple speech recognition servers with the minimum CPU usage rates to process the first speech recognition task when multiple speech recognition servers with the minimum CPU usage rates are found out.

[0013] Optionally, the sending module is further used to reject access to the speech recognition task and send a busy service prompt to the user when it is found that the CPU usage rate of each speech recognition server in the task execution list is higher than a preset first threshold.

[0014] Furthermore, the present invention also proposes a computer device, which includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the load balancing implementation method in the speech recognition system as described above are implemented.

[0015] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, which stores a computer program, and the computer program can be executed by at least one processor so that the at least one processor performs the steps of the load balancing implementation method in the above-mentioned speech recognition system.

[0016] Compared with the prior art, the method, apparatus, computer device and computer-readable storage medium for implementing load balancing in a speech recognition system proposed in the present invention can, after receiving a user's speech recognition task, query a task execution list including the numbers of all speech recognition servers, a list of execution tasks and CPU usage rates, and then select a speech recognition server with the lowest CPU usage rate to execute the speech recognition task, and also update the task execution status and CPU usage rate fed back by the speech recognition server to the task execution list, thereby realizing fast, real-time and efficient load balancing in the speech recognition system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a schematic diagram of an optional hardware architecture of a computer device of the present invention;

[0018] Figure 2 It is a program module diagram of an embodiment of a load balancing implementation device in a speech recognition system of the present invention;

[0019] Figure 3 It is a flow chart of an embodiment of a method for implementing load balancing in a speech recognition system of the present invention.

[0020] Reference numerals:

[0021]

[0022]

[0023] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] It should be noted that the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0026] See also Figure 1 , which is a schematic diagram of an optional hardware architecture of the computer device 1 of the present invention.

[0027] In this embodiment, the computer device 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can be interconnected and communicated via a system bus.

[0028] The computer device 1 is connected to the network via the network interface 13 ( Figure 1 The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or a call network.

[0029] It should be pointed out that Figure 1 The computer device 1 is shown only with components 11 - 13 , but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0030] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the computer device 1, such as a hard disk or memory of the computer device 1. In other embodiments, the memory 11 can also be an external storage device of the computer device 1, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped with the computer device 1. Of course, the memory 11 can also include both the internal storage unit of the computer device 1 and its external storage device. In this embodiment, the memory 11 is generally used to store the operating system and various application software installed on the computer device 1, such as the program code of the load balancing implementation device 200 in the speech recognition system. In addition, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.

[0031] The processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 12 is generally used to control the overall operation of the computer device 1, such as performing control and processing related to data interaction or communication. In this embodiment, the processor 12 is used to run the program code stored in the memory 11 or process data, such as running the load balancing implementation device 200 in the speech recognition system.

[0032] The network interface 13 may include a wireless network interface or a wired network interface. The network interface 13 is generally used to establish a communication connection between the computer device 1 and the above-mentioned speech recognition system including multiple speech recognition servers, as well as other terminal devices such as mobile terminals, mobile phones, user equipment, mobile phones and portable devices, PC terminals, etc.

[0033] In this embodiment, when the load balancing implementation device 200 in the speech recognition system is installed and running in the computer device 1, when the load balancing implementation device 200 in the speech recognition system is running, after receiving the user's speech recognition task, it can query the task execution list including the numbers of all speech recognition servers, the execution task list and the CPU usage rate, and then select the speech recognition server with the lowest CPU usage rate to execute the speech recognition task, and also update the task execution status and CPU usage rate fed back by the speech recognition server to the task execution list, thereby realizing fast, real-time and efficient load balancing in the speech recognition system.

[0034] So far, the application environment of each embodiment of the present invention and the hardware structure and function of the related equipment have been described in detail. Next, based on the above application environment and related equipment, various embodiments of the present invention are proposed.

[0035] First, the present invention proposes a load balancing implementation device 200 in a speech recognition system.

[0036] See also Figure 2 , which is a program module diagram of an embodiment of a load balancing implementation device 200 in a speech recognition system of the present invention.

[0037] In this embodiment, the load balancing implementation device 200 in the speech recognition system includes a series of computer program instructions stored in the memory 11. When the computer program instructions are executed by the processor 12, the load balancing implementation function in the speech recognition system of each embodiment of the present invention can be implemented. In some embodiments, based on the specific operations implemented by each part of the computer program instructions, the load balancing implementation device 200 in the speech recognition system can be divided into one or more modules. For example, in Figure 2 In the embodiment, the load balancing implementation device 200 in the speech recognition system can be divided into a receiving module 201, a query module 202, a sending module 203 and an updating module 204.

[0038] The receiving module 201 is used to receive a first speech recognition task sent by a user.

[0039] Specifically, when a user uses the voice recognition function on a terminal device such as a mobile terminal or a PC, the terminal device generates a voice recognition task and then sends the voice recognition task to the computer device 1. In this embodiment, since the voice recognition system includes dozens or hundreds of voice recognition servers, when a user sends a first voice recognition task to the computer device 1, the receiving module 201 receives the first voice recognition task sent by the user.

[0040] The query module 202 is used to query the CPU usage of each speech recognition server in a preset task execution list, wherein the task execution list includes list information of all speech recognition servers, and the list information includes: the number of the speech recognizer, the list of speech recognition tasks being executed, and the CPU usage.

[0041] Specifically, the computer device 1 pre-sets a task execution list, and the task execution list includes list information of all speech recognition servers, and the list information includes: the number of the speech recognizer, the list of speech recognition tasks being executed, and the CPU usage rate. In this embodiment, the initial values ​​of the amount of speech recognition tasks being executed and the CPU usage rate of each speech recognition server are set to 0 and 0% respectively. When the speech recognition server is assigned a speech recognition task, the list of speech recognition tasks being executed and the CPU usage rate of each speech recognition server will become different. The query module 202 queries the CPU usage rates of all speech recognition servers in the task execution list after the receiving module 201 receives the first speech recognition task sent by the user.

[0042] The sending module 203 is configured to send the first speech recognition task to the first speech recognition server when it is found that the first CPU usage rate of the first speech recognition server is the minimum.

[0043] Specifically, after the query module 202 queries the CPU usage rates of all speech recognition servers, the sending module 203 selects a speech recognition server with the lowest CPU usage rate from all speech recognition servers, and then sends the first speech recognition task received by the receiving module 201 to the speech recognition server. In this embodiment, the sending module 203 is also used to randomly select a speech recognition server from the multiple speech recognition servers with the lowest CPU usage rates to process the first speech recognition task when the query module 202 queries that there are multiple speech recognition servers with the lowest CPU usage rates. For example, the query module 202 queries that the task execution list includes 3 speech recognition servers numbered 101, 201, and 301, wherein the speech recognition tasks being executed by the 101 speech recognition server include a, b, and c, and the CPU usage rate is 30%; the speech recognition tasks being executed by the 201 speech recognition server include x, y, z, and w, and the CPU usage rate is 37%; the speech recognition tasks being executed by the 301 speech recognition server include m, n, q, and t, and the CPU usage rate is 50%. Therefore, the sending module 203 selects the speech recognition server numbered 101 with the lowest CPU usage, and then sends the first speech recognition task to the speech recognition server 101. In other words, the sending module 203 selects the speech recognition server with the smallest load, and then sends the first speech recognition task to the speech recognition server for speech recognition task.

[0044] Of course, the sending module 203 is also used to refuse access to the speech recognition task when the query module 202 finds that the CPU usage rate of each speech recognition server in the task execution list is higher than a preset first threshold, such as 90%, and send a busy service prompt to the user, such as a prompt "Busy now, please try again later". In this way, the speech recognition server is prevented from being overloaded and crashing.

[0045] The receiving module 201 is further configured to receive a message from the first speech recognition server that the first speech recognition task is being processed and the instantaneous second CPU usage rate of the first speech recognition server. The updating module 204 is configured to update the second CPU usage rate and the first speech recognition task to the list information corresponding to the first speech recognition server in the task execution list.

[0046] Specifically, after the sending module 203 sends the first speech recognition task to the first speech recognition server, the first speech recognition server starts to execute the first speech recognition task, and then also feeds back the message that the first speech recognition task is being processed and the instantaneous CPU usage rate of the first speech recognition server to the computer device 1. Therefore, the receiving module 201 receives the message that the first speech recognition task is being processed and the second CPU usage rate of the first speech recognition server returned by the first speech recognition server. Then, the updating module 204 updates the second CPU usage rate and the first speech recognition task to the list information corresponding to the first speech recognition server in the task execution list. For example, the first speech recognition task is h, and the original list information of the 101 speech recognition server includes the speech recognition tasks being executed including a, b, c, and the CPU utilization rate is 30%; then the receiving module 201 receives the return from the 101 speech recognition server that the speech recognition task h is being executed and the immediate CPU utilization rate is 48%, then the updating module 204 updates the list information of the 101 speech recognition server in the task execution list to: the speech recognition tasks being executed include a, b, c, h, and the CPU utilization rate is 48%.

[0047] In addition, the receiving module 201 is further used to receive a message that the first speech recognition server has completed the second speech recognition task and the instant third CPU usage rate of the first speech recognition server. The updating module 204 is further used to update the third CPU usage rate and the second speech recognition task to the list information corresponding to the first speech recognition server in the task execution list.

[0048] Specifically, when the first speech recognition server completes the speech recognition task being executed before receiving a new speech recognition task, it will also send the completion information of the speech recognition task and the instant CPU usage rate to the computer device 1. For example, the list information of the 101 speech recognition servers includes the speech recognition tasks being executed, including a, b, c, h, and the CPU usage rate is 48%; then the speech recognition task a processed by the 101 speech recognition servers is completed, and the CPU usage rate also becomes 40%, then the 101 speech recognition servers send the completion of the speech recognition task a and the instant CPU usage rate is 40% to the computer device 1. The receiving module 201 receives the information sent by the 101 speech recognition servers, and then the updating module 204 updates the list information of the 101 speech recognition servers in the task execution list to: the speech recognition tasks being executed include b, c, h, and the CPU usage rate is 40%.

[0049] As can be seen from the above, after receiving the user's voice recognition task, the computer device 1 can query the task execution list including the numbers of all voice recognition servers, the execution task list and the CPU usage rate, and then select the voice recognition server with the lowest CPU usage rate to execute the voice recognition task, and will also update the task execution status and CPU usage rate fed back by the voice recognition server to the task execution list, thereby realizing fast, real-time and efficient load balancing in the voice recognition system.

[0050] In addition, the present invention also proposes a method for implementing load balancing in a speech recognition system, and the method is applied to a computer device.

[0051] See also Figure 3 FIG. 1 is a flow chart of an embodiment of a method for implementing load balancing in a speech recognition system of the present invention. In this embodiment, according to different requirements, Figure 3 The execution order of the steps in the flowchart shown may be changed, and some steps may be omitted.

[0052] Step S500: receiving a first speech recognition task sent by a user.

[0053] Specifically, when a user uses the voice recognition function on a terminal device such as a mobile terminal or a PC, the terminal device generates a voice recognition task and then sends the voice recognition task to the computer device. In this embodiment, since the voice recognition system includes dozens or hundreds of voice recognition servers, when a user sends a first voice recognition task to the computer device, the computer device receives the first voice recognition task sent by the user.

[0054] Step S502, querying the CPU usage of each speech recognition server in a preset task execution list, wherein the task execution list includes list information of all speech recognition servers, and the list information includes: the number of the speech recognizer, the list of speech recognition tasks being executed, and the CPU usage.

[0055] Specifically, the computer device pre-sets a task execution list, and the task execution list includes list information of all speech recognition servers, and the list information includes: the number of the speech recognizer, the list of speech recognition tasks being executed, and the CPU usage rate. In this embodiment, the initial values ​​of the number of speech recognition tasks being executed and the CPU usage rate of each speech recognition server are set to 0 and 0% respectively. After the speech recognition server is assigned a speech recognition task, the list of speech recognition tasks being executed and the CPU usage rate of each speech recognition server will become different. After receiving the first speech recognition task sent by the user, the computer device further queries the CPU usage rates of all speech recognition servers in the task execution list.

[0056] Step S504: When it is found that the first CPU usage rate of the first speech recognition server is the minimum, the first speech recognition task is sent to the first speech recognition server.

[0057] Specifically, after the computer device inquires out the CPU usage rates of all the speech recognition servers, it further selects a speech recognition server with the smallest CPU usage rate from all the speech recognition servers, and then sends the received first speech recognition task to the speech recognition server. In this embodiment, when the computer device inquires out that there are multiple speech recognition servers with the smallest CPU usage rates, it randomly selects a speech recognition server from the multiple speech recognition servers with the smallest CPU usage rates to process the first speech recognition task. For example, the computer device inquires out that the task execution list includes 3 speech recognition servers numbered 101, 201, and 301, wherein the speech recognition tasks being executed by the 101 speech recognition server include a, b, and c, and the CPU usage rate is 30%; the speech recognition tasks being executed by the 201 speech recognition server include x, y, z, and w, and the CPU usage rate is 37%; the speech recognition tasks being executed by the 301 speech recognition server include m, n, q, and t, and the CPU usage rate is 50%. Therefore, the computer device will select the speech recognition server numbered 101 with the smallest CPU usage rate, and then send the first speech recognition task to the 101 speech recognition server. That is, the computer device selects a speech recognition server with the smallest load, and then sends the first speech recognition task to the speech recognition server for performing the speech recognition task.

[0058] Of course, when the computer device finds that the CPU usage rate of each speech recognition server in the task execution list is higher than a preset first threshold, such as 90%, it will refuse to access the speech recognition task and send a busy service prompt to the user, such as a prompt "busy now, please try again later." In this way, the speech recognition server is prevented from being overloaded and crashing.

[0059] Step S506: Receive a message from the first speech recognition server that the first speech recognition task is being processed and an instant second CPU usage rate of the first speech recognition server.

[0060] Step S508: Update the second CPU usage rate and the first speech recognition task to the list information corresponding to the first speech recognition server in the task execution list.

[0061] Specifically, after the computer device sends the first speech recognition task to the first speech recognition server, the first speech recognition server starts to execute the first speech recognition task, and then also feeds back the message that the first speech recognition task is being processed and the instantaneous CPU usage rate of the first speech recognition server to the computer device. The computer device receives the message that the first speech recognition task is being processed and the second CPU usage rate of the first speech recognition server returned by the first speech recognition server. Then, the update module 204 updates the second CPU usage rate and the first speech recognition task to the list information corresponding to the first speech recognition server in the task execution list. For example, the first speech recognition task is h, and the original list information of the 101 speech recognition server includes the speech recognition tasks being executed, including a, b, c, and the CPU usage rate is 30%; then the computer device receives the speech recognition task h returned by the 101 speech recognition server being executed and the instantaneous CPU usage rate is 48%, and then further updates the list information of the 101 speech recognition server in the task execution list to: the speech recognition tasks being executed include a, b, c, h, and the CPU usage rate is 48%.

[0062] In addition, the computer device also receives a message that the first speech recognition server has completed the second speech recognition task and the instant third CPU usage rate of the first speech recognition server, and then updates the third CPU usage rate and the second speech recognition task to the list information corresponding to the first speech recognition server in the task execution list.

[0063] Specifically, when the first speech recognition server completes the speech recognition task being executed before receiving a new speech recognition task, the first speech recognition server will also send the completion information of the speech recognition task and the instant CPU usage rate to the computer device. For example, the list information of the 101 speech recognition servers includes the speech recognition tasks being executed, including a, b, c, h, and the CPU usage rate is 48%; then the speech recognition task a processed by the 101 speech recognition servers is completed, and the CPU usage rate also becomes 40%, then the 101 speech recognition servers send the completion of speech recognition task a and the instant CPU usage rate is 40% to the computer device. The computer device receives the information sent by the 101 speech recognition servers, and updates the list information of the 101 speech recognition servers in the task execution list to: the speech recognition tasks being executed include b, c, h, and the CPU usage rate is 40%.

[0064] The load balancing implementation method in the speech recognition system proposed in this embodiment can, after receiving the user's speech recognition task, query the task execution list including the numbers of all speech recognition servers, the execution task list and the CPU utilization rate, and then select the speech recognition server with the lowest CPU utilization rate to execute the speech recognition task, and also update the task execution status and CPU utilization rate fed back by the speech recognition server to the task execution list, thereby realizing fast, real-time and efficient load balancing in the speech recognition system.

[0065] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0066] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0067] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for implementing load balancing in a speech recognition system, characterized in that: The method comprises the following steps: receiving a first speech recognition task sent by a user; Querying the CPU usage of each speech recognition server in a preset task execution list, wherein the task execution list includes list information of all speech recognition servers, and the list information includes: the number of the speech recognizer, the list of speech recognition tasks being executed, and the CPU usage; When it is found that the first CPU usage rate of the first speech recognition server is the smallest, sending the first speech recognition task to the first speech recognition server; Receive a message from the first speech recognition server that the first speech recognition task is being processed and an instant second CPU usage rate of the first speech recognition server; Updating the second CPU usage rate and the first speech recognition task to the list information corresponding to the first speech recognition server in the task execution list; The method further comprises: Receive a message that the first speech recognition server completes the second speech recognition task and the instant third CPU usage rate of the first speech recognition server; Updating the third CPU usage rate and the second speech recognition task to the list information corresponding to the first speech recognition server in the task execution list; When it is found that the CPU usage rate of each speech recognition server in the task execution list is higher than a preset first threshold, access to the speech recognition task is rejected, and a busy service prompt is sent to the user.

2. The method for implementing load balancing in a speech recognition system according to claim 1, characterized in that: The method further comprises: When multiple minimum CPU usage rates are found, a speech recognition server is randomly selected from the multiple speech recognition servers with the minimum CPU usage rates to process the first speech recognition task.

3. A load balancing implementation device in a speech recognition system, characterized in that: The device comprises: A receiving module, used for receiving a first speech recognition task sent by a user; A query module, used to query the CPU usage of each speech recognition server in a preset task execution list, wherein the task execution list includes list information of all speech recognition servers, and the list information includes: the number of the speech recognizer, the list of speech recognition tasks being executed, and the CPU usage; A sending module, configured to send the first speech recognition task to the first speech recognition server when it is found that the first CPU usage rate of the first speech recognition server is the minimum; The receiving module is further used to receive a message fed back by the first speech recognition server that the first speech recognition task is being processed and an instant second CPU usage rate of the first speech recognition server; An updating module, used for updating the second CPU usage rate and the first speech recognition task to the list information corresponding to the first speech recognition server in the task execution list; The receiving module is further used to receive a message indicating that the first speech recognition server has completed the second speech recognition task and the instant third CPU usage rate of the first speech recognition server; The updating module is further used to update the third CPU usage rate and the second speech recognition task to the list information corresponding to the first speech recognition server in the task execution list; The sending module is further configured to reject access to the speech recognition task and send a busy service prompt to the user when it is found that the CPU usage of each speech recognition server in the task execution list is higher than a preset first threshold.

4. The load balancing implementation device in the speech recognition system according to claim 3, characterized in that: The sending module is further configured to randomly select a speech recognition server from the multiple speech recognition servers with the minimum CPU usage rate to process the first speech recognition task when multiple speech recognition servers with the minimum CPU usage rate are found out.

5. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the load balancing implementation method in the speech recognition system as described in any one of claims 1-2 are implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program can be executed by at least one processor to enable the at least one processor to perform the steps of the load balancing implementation method in the speech recognition system according to any one of claims 1 to 2.