WO2021012506A1 - 语音识别***中的负载均衡实现方法、装置以及计算机设备 - Google Patents

语音识别***中的负载均衡实现方法、装置以及计算机设备 Download PDF

Info

Publication number
WO2021012506A1
WO2021012506A1 PCT/CN2019/117557 CN2019117557W WO2021012506A1 WO 2021012506 A1 WO2021012506 A1 WO 2021012506A1 CN 2019117557 W CN2019117557 W CN 2019117557W WO 2021012506 A1 WO2021012506 A1 WO 2021012506A1
Authority
WO
WIPO (PCT)
Prior art keywords
voice recognition
task
cpu usage
usage rate
recognition server
Prior art date
Application number
PCT/CN2019/117557
Other languages
English (en)
French (fr)
Inventor
胡俊
吴欢
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021012506A1 publication Critical patent/WO2021012506A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/28Constructional details of speech recognition systems
    • G10L15/30Distributed recognition, e.g. in client-server systems, for mobile phones or network applications
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/28Constructional details of speech recognition systems
    • G10L15/32Multiple recognisers used in sequence or in parallel; Score combination systems therefor, e.g. voting systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer

Definitions

  • This application relates to the field of cloud computing technology, and in particular to a method, device, computer equipment, and non-volatile computer-readable storage medium for implementing load balancing in a speech recognition system.
  • voice recognition function is combined with other application apps to achieve the related functions of controlling other application apps according to received voice commands.
  • voice recognition server in order to provide voice services to a large number of users, it is necessary to assume many voice recognition servers.
  • the inventor realizes that since dozens or hundreds of voice servers are set up, in order to achieve load balancing of voice recognition tasks for a large number of users, the prior art usually uses a voice access server, and then the voice access server uses The polling method is used to achieve load balancing among various voice recognition servers, and during the polling process, the voice access server needs to perform load calculation on each voice recognition server according to a preset more complex load balancing algorithm to determine the voice recognition Whether the server is available, the voice recognition task can be issued only when it is determined that the voice server is available. Therefore, the existing load balancing method takes a long time and has low efficiency.
  • this application proposes a method, device, computer equipment, and non-volatile computer-readable storage medium for implementing load balancing in a voice recognition system, which can include all information through a query after receiving a user’s voice recognition task.
  • the execution status and the CPU usage rate are updated to the task execution list, thereby realizing fast, real-time, and efficient load balancing in the speech recognition system.
  • the present application provides a method for implementing load balancing in a speech recognition system.
  • the method includes:
  • a voice recognition server receiving the message being processed by the first voice recognition task fed back by the first voice recognition server and the instant second CPU usage rate of the first voice recognition server; and changing the second CPU usage rate And the first voice recognition task is updated to the list information corresponding to the first voice recognition server in the task execution list.
  • the present application also provides a device for implementing load balancing in a speech recognition system, and the device includes:
  • the receiving module is used to receive the first voice recognition task sent by the user; the query module is used to query the CPU usage rate of each voice recognition server in the preset task execution list, where the task execution list includes all speech recognition
  • the list information of the server includes: the number of the speech recognizer, the list of the speech recognition tasks being executed, and the CPU usage rate;
  • the sending module is used to query the first speech recognition server with the highest CPU usage rate Hour, sending the first voice recognition task to the first voice recognition server;
  • the receiving module is further configured to receive the message being processed by the first voice recognition task fed back by the first voice recognition server and The instant second CPU usage rate of the first speech recognition server; an update module for updating the second CPU usage rate and the first speech recognition task to the task execution list corresponding to the first List information of the speech recognition server.
  • the present application also proposes a computer device, the computer device includes a memory and a processor, the memory stores computer-readable instructions that can run on the processor, and the computer-readable instructions are The implementation steps when the processor is executed:
  • a voice recognition server receiving the message being processed by the first voice recognition task fed back by the first voice recognition server and the instant second CPU usage rate of the first voice recognition server; and changing the second CPU usage rate And the first voice recognition task is updated to the list information corresponding to the first voice recognition server in the task execution list.
  • this application also provides a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be At least one processor executes, so that the at least one processor executes the steps:
  • a voice recognition server receiving the message being processed by the first voice recognition task fed back by the first voice recognition server and the instant second CPU usage rate of the first voice recognition server; and changing the second CPU usage rate And the first voice recognition task is updated to the list information corresponding to the first voice recognition server in the task execution list.
  • the method, device, computer equipment, and non-volatile computer-readable storage medium for implementing load balancing in the voice recognition system proposed in this application can query the voice recognition server including all voice recognition servers after receiving the user’s voice recognition task. Number, execution task list and task execution list of CPU usage, and then select the speech recognition server with the smallest CPU usage to execute the speech recognition task, and also use the task execution status and CPU feedback from the speech recognition server The utilization rate is updated to the task execution list, thereby achieving fast, real-time, and efficient load balancing in the speech recognition system.
  • Figure 1 is a schematic diagram of an optional hardware architecture of the computer equipment of the present application.
  • FIG. 2 is a schematic diagram of program modules of an embodiment of a device for implementing load balancing in a speech recognition system according to the present application;
  • FIG. 3 is a schematic flowchart of an embodiment of a method for implementing load balancing in the speech recognition system of the present application.
  • FIG. 1 is a schematic diagram of an optional hardware architecture of the computer device 1 of the present application.
  • the computer device 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can communicate with each other through a system bus.
  • the computer device 1 is connected to a network (not shown in FIG. 1) through a network interface 13, and is connected to a voice recognition system including multiple voice recognition servers through the network, and other terminal devices such as mobile terminals and mobile phones. Telephone), User Equipment (UE), mobile phone (handset) and portable equipment (portable equipment), PC terminal, etc.
  • the network may be Intranet, Internet, Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G Network, Bluetooth (Bluetooth), Wi-Fi, call network and other wireless or wired networks.
  • GSM Global System of Mobile communication
  • WCDMA Wideband Code Division Multiple Access
  • 4G network Fifth Generation
  • 5G Network Fifth Generation
  • Bluetooth Bluetooth
  • Wi-Fi call network and other wireless or wired networks.
  • FIG. 1 only shows the computer device 1 with components 11-13, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the memory 11 includes at least one type of non-volatile computer-readable storage medium
  • the non-volatile computer-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 , Disks, CDs, etc.
  • the memory 11 may be an internal storage unit of the computer device 1, such as a hard disk or memory of the computer device 1.
  • the memory 11 may also be an external storage device of the computer device 1, for example, a plug-in hard disk equipped with the computer device 1, a smart media card (SMC), a secure digital ( Secure Digital, SD card, Flash Card, etc.
  • the memory 11 may also include both the internal storage unit of the computer device 1 and its external storage device.
  • the memory 11 is generally used to store the operating system and various application software installed in the computer device 1, for example, the program code of the load balancing device 200 in the voice recognition system.
  • the memory 11 can also be used to temporarily store various types of data that have been output or will be output.
  • the computer-readable instructions can be executed by at least one processor, so that the at least one processor executes the steps:
  • a voice recognition server receiving the message being processed by the first voice recognition task fed back by the first voice recognition server and the instant second CPU usage rate of the first voice recognition server; and changing the second CPU usage rate And the first voice recognition task is updated to the list information corresponding to the first voice recognition server in the task execution list.
  • the processor 12 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is generally used to control the overall operation of the computer device 1, such as performing data interaction or communication-related control and processing.
  • the processor 12 is used to run the program code or process data stored in the memory 11, for example, to run the load balancing implementation device 200 in the voice recognition system.
  • the network interface 13 may include a wireless network interface or a wired network interface.
  • the network interface 13 is usually used in the computer device 1 and the above-mentioned voice recognition system including multiple voice recognition servers, and other terminal devices such as mobile devices. Terminals, mobile phones, user equipment, mobile phones and portable devices, PC terminals, etc. establish communication connections.
  • the computer device 1 when the computer device 1 is installed and running with the load balancing device 200 in the voice recognition system, when the load balancing device 200 in the voice recognition system is running, it can receive the user's voice After the task is recognized, by querying the task execution list including the numbers of all speech recognition servers, the execution task list, and the CPU usage rate, the speech recognition server with the smallest CPU usage rate is selected to perform the speech recognition task, and the The task execution status and CPU usage rate fed back by the speech recognition server are updated to the task execution list, thereby achieving fast, real-time, and efficient load balancing in the speech recognition system.
  • this application proposes a device 200 for implementing load balancing in a speech recognition system.
  • FIG. 2 it is a program module diagram of an embodiment of a load balancing device 200 in the speech recognition system of the present application.
  • the device 200 for implementing load balancing in the voice recognition system includes a series of computer-readable instructions stored on the memory 11.
  • each of the present application can be implemented.
  • the load balancing function in the voice recognition system of the embodiment is realized.
  • the load balancing implementation apparatus 200 in the speech recognition system may be divided into one or more modules.
  • the device 200 for implementing load balancing in the voice recognition system can be divided into a receiving module 201, a query module 202, a sending module 203, and an update module 204. among them:
  • the receiving module 201 is configured to receive the first voice recognition task sent by the user.
  • the terminal device when a user uses a 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.
  • the voice recognition system since the voice recognition system includes dozens or hundreds of voice recognition servers, when the user sends the first voice recognition task to the computer device 1, the receiving module 201 receives the first voice recognition task sent by the user. Speech recognition tasks.
  • the query module 202 is used to query the CPU usage rate of each voice recognition server in a preset task execution list, where the task execution list includes list information of all voice recognition servers, and the list information includes: voice The number of the recognizer, the list of speech recognition tasks being performed, and the CPU usage rate.
  • the computer device 1 presets a task execution list, 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.
  • the amount of speech recognition tasks being performed and the CPU usage rate of each speech recognition server are set to 0 and 0% respectively.
  • the query module 202 queries the CPU usage rates of all the voice recognition servers in the task execution list after the receiving module 201 receives the first voice recognition task sent by the user.
  • the sending module 203 is configured to send the first voice recognition task to the first voice recognition server when the first CPU usage rate of the first voice recognition server is minimum.
  • the sending module 203 will select a voice recognition server with the smallest CPU usage rate from all the voice recognition servers, and then send the The first voice recognition task received by the receiving module 201 is sent to the voice recognition server.
  • the sending module 203 is further configured to, when the query module 202 finds out that there are multiple minimum CPU usage rates, randomly select one from multiple speech recognition servers with the minimum CPU usage rate.
  • the voice recognition server is used to process the first voice recognition task. For example, the query module 202 inquires that the task execution list includes 3 speech recognition servers numbered 101, 201, and 301.
  • the speech recognition tasks being performed by the 101 speech recognition server include a, b, c, and CPU usage The rate is 30%; the speech recognition tasks being performed by the 201 speech recognition server include x, y, z, w, and the CPU usage rate is 37%; the speech recognition tasks being performed by the 301 speech recognition server include m, n, q, t, The CPU usage rate is 50%. Therefore, the sending module 203 selects the 101 voice recognition server with the smallest CPU usage rate, and then sends the first voice recognition task to the 101 voice recognition server. That is, the sending module 203 selects the speech recognition server with the least load, and then sends the first speech recognition task to the speech recognition server to perform the speech recognition task.
  • the sending module 203 is also used for when the query module 202 inquires that the CPU usage rate of each voice recognition server in the task execution list is higher than a preset first threshold, such as 90%, Then it refuses to access the voice recognition task, and sends a busy reminder to the user, such as the prompt "Busy now, please try again later". In this way, it is avoided that the speech recognition server is overloaded and causes a crash.
  • a preset first threshold such as 90%
  • the receiving module 201 is also configured to receive the message being processed by the first voice recognition task fed back by the first voice recognition server and the instant second CPU usage rate of the first voice recognition server.
  • the update module 204 is configured to update the second CPU usage rate and the first voice recognition task to the list information corresponding to the first voice recognition server in the task execution list.
  • 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 sends The message being processed by the first voice recognition task and the instant CPU usage rate of the first voice recognition server are fed back to the computer device 1. Therefore, the receiving module 201 receives the message being processed by the first voice recognition task and the second CPU usage rate of the first voice recognition server returned by the first voice recognition server.
  • 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.
  • the first speech recognition task is h
  • 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 receiving module 201 Receiving the voice recognition task h returned by the 101 voice recognition server is being executed and the instant CPU usage rate is 48%, then the update module 204 updates the list information of the 101 voice recognition server in the task execution list to:
  • the speech recognition tasks performed include a, b, c, h, and the CPU usage rate is 48%.
  • the receiving module 201 is also configured to receive a message indicating that the first voice recognition server performs the second voice recognition task and the instant third CPU usage rate of the first voice recognition server.
  • the update module 204 is further configured 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 voice recognition task being executed when the voice recognition task being executed is completed before the first voice recognition server receives a new voice recognition task, it will also send the completed information of the voice recognition task and the instant CPU usage rate to the Computer equipment 1.
  • the 101 speech recognition server list information 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 server is completed, The CPU usage rate also becomes 40%, so the 101 voice recognition server sends the voice recognition task a completed and the instantaneous CPU usage rate is 40% to the computer device 1.
  • the receiving module 201 receives the information sent by the 101 voice recognition server, and then the updating module 204 updates the list information of the 101 voice recognition server in the task execution list to: the voice recognition task being executed includes b, c, h, CPU usage rate is 40%.
  • the computer device 1 can, after receiving the voice recognition task of the user, 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 smallest CPU usage rate.
  • the voice recognition server is used to perform the voice recognition task, and it will also update the task execution status and CPU usage rate fed back by the voice recognition server to the task execution list, so as to achieve fast, real-time and efficient speech Identify the load balance in the system.
  • this application also proposes a method for implementing load balancing in a speech recognition system, and the method is applied to computer equipment.
  • FIG. 3 is a schematic flowchart of an embodiment of a method for implementing load balancing in the speech recognition system of the present application.
  • the execution order of the steps in the flowchart shown in FIG. 3 can be changed, and some steps can be omitted.
  • Step S500 Receive the first voice recognition task sent by the user.
  • the terminal device when a user uses a 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.
  • the voice recognition system since the voice recognition system includes dozens or hundreds of voice recognition servers, when the user sends the first voice recognition task to the computer device, the computer device receives the first voice recognition sent by the user. task.
  • Step S502 Query the CPU usage rate of each voice recognition server in the preset task execution list.
  • 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 the speech recognition tasks being executed, and the CPU usage rate.
  • the computer device presets a task execution list, 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 rate.
  • the amount of speech recognition tasks being performed and the CPU usage rate of each speech recognition server are set to 0 and 0% respectively.
  • the computer device After receiving the first voice recognition task sent by the user, the computer device further queries the CPU usage rates of all voice recognition servers in the task execution list.
  • Step S504 When the first CPU usage rate of the first speech recognition server is found to be the smallest, the first speech recognition task is sent to the first speech recognition server.
  • the computer device queries the CPU usage rates of all voice recognition servers, it further selects a voice recognition server with the smallest CPU usage rate from all voice recognition servers, and then recognizes the received first voice recognition server.
  • the task is sent to the speech recognition server.
  • the computer device finds out that there are multiple minimum CPU usage rates, it randomly selects a voice recognition server from a plurality of voice recognition servers with the minimum CPU usage rate to process the first Speech recognition tasks. For example, the computer device inquires that the task execution list includes 3 speech recognition servers numbered 101, 201, and 301.
  • the speech recognition tasks being performed by the 101 speech recognition server include a, b, c, and CPU usage 30%; 201 speech recognition server is performing speech recognition tasks including x, y, z, w, and the CPU usage rate is 37%; 301 speech recognition server is performing speech recognition tasks including m, n, q, t, CPU The utilization rate is 50%. Therefore, the computer device selects the 101 speech recognition server with the smallest CPU usage rate, and then sends the first speech recognition task to the 101 speech recognition server. That is, the computer device selects the speech recognition server with the least load, and then sends the first speech recognition task to the speech recognition server to perform the speech recognition task.
  • the computer device inquires 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 will A busy reminder is sent to the user, such as a reminder of "Busy now, please try again later.” In this way, it is avoided that the speech recognition server is overloaded and causes a crash.
  • a preset first threshold such as 90%
  • Step S506 Receive the message being processed by the first voice recognition task fed back by the first voice recognition server and the instant second CPU usage rate of the first voice recognition server.
  • 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.
  • the first speech recognition server starts to execute the first speech recognition task, and then sends the The message being processed by the first voice recognition task and the instant CPU usage rate of the first voice recognition server are fed back to the computer device.
  • the computer device receives the message being processed by the first voice recognition task and the second CPU usage rate of the first voice recognition server returned by the first voice recognition server.
  • the update module 204 updates the second CPU usage rate and the first voice recognition task to the list information corresponding to the first voice recognition server in the task execution list.
  • the first speech recognition task is h
  • 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 list information of the 101 speech recognition server in the task execution list is further updated to: the speech recognition task being executed includes a, b, c, h, the CPU usage rate is 48%.
  • the computer device may also receive a message indicating that the first voice recognition server performs the second voice recognition task and the instant third CPU usage rate of the first voice recognition server. Then the third CPU usage rate and the second voice recognition task are updated to the list information corresponding to the first voice recognition server in the task execution list.
  • the voice recognition task being executed when the voice recognition task being executed is completed before the first voice recognition server receives a new voice recognition task, it will also send the completed information of the voice recognition task and the instant CPU usage rate to the Computer equipment.
  • the 101 speech recognition server list information 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 server is completed, The CPU usage rate also becomes 40%, then the 101 voice recognition server sends the voice recognition task a completed and the instantaneous CPU usage rate is 40% to the computer device.
  • the computer device receives the information sent by the 101 voice recognition server, and then updates the list information of the 101 voice recognition server in the task execution list to: the voice recognition task being executed includes b, c, h, and CPU usage rate Is 40%.
  • the method for implementing load balancing in the speech recognition system proposed in this embodiment can query the task execution list including the numbers of all speech recognition servers, the execution task list, and the CPU usage rate after receiving the user's speech recognition task. Then select the speech recognition server with the smallest CPU usage rate to perform 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 achieving fast, Real-time and efficient realization of load balancing in the speech recognition system.
  • the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. ⁇
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephonic Communication Services (AREA)

Abstract

提供了一种语音识别***中的负载均衡实现方法、装置、服务器及非易失性计算机可读存储介质,其中该负载均衡实现方法包括:接收用户发送的第一语音识别任务(S500);查询预设的任务执行列表中的每个语音识别服务器的CPU使用率(S502);将第一语音识别任务发送至第一CPU使用率最小的第一语音识别服务器(S504);接收第一语音识别服务器反馈的即时第二CPU使用率并更新到任务执行列表中(S506)。该方法能够通过查询动态更新的任务执行列表,然后选择CPU使用率最小的语音识别服务器用于执行接收到的语音识别任务,从而实现快速、实时、高效地实现负载均衡。

Description

语音识别***中的负载均衡实现方法、装置以及计算机设备
本申请要求于2019年07月19日提交中国专利局、申请号为201910655562.2、发明名称为“语音识别***中的负载均衡实现方法、装置以及计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云计算技术领域,尤其涉及一种语音识别***中的负载均衡实现方法、装置、计算机设备及非易失性计算机可读存储介质。
背景技术
随着语音识别技术的高速发展,很多企业提供了专门的语音识别服务功能,例如,将语音识别功能与其他应用APP联合从而达到根据接收到的语音指令控制其他应用APP的相关功能。对于企业而言,为了给大量的用户提供语音服务,则需要假设很多个语音识别服务器。发明人意识到,由于设置了几十个上百个语音服务器,对于实现对大量用户的语音识别任务的负载均衡,现有技术中通常使用的是设置语音接入服务器,然后语音接入服务器采用轮询方式以实现各个语音识别服务器之间的负载均衡,而且轮询过程中所述语音接入服务器需要根据预设的较为复杂的负载均衡算法对每个语音识别服务器进行负载计算以确定语音识别服务器是否可用,当确定出语音服务器可用时才能将语音识别任务进行下发。因此,现有的负载均衡方式耗时较长,效率较低。
发明内容
有鉴于此,本申请提出一种语音识别***中的负载均衡实现方法、装置、计算机设备及非易失性计算机可读存储介质,能够在接收到用户的语音识别任务之后,通过查询包括有所有语音识别服务器的编号、执行任务清单和CPU使用率的任务执行列表,然后选择CPU使用率最小的语音识别服务器用于执行所述语音识别任务,并且还会将所述语音识别服务 器的反馈的任务执行情况和CPU使用率更新到所述任务执行列表,从而实现快速、实时、高效地实现语音识别***中的负载均衡。
首先,为实现上述目的,本申请提供一种语音识别***中的负载均衡实现方法,所述方法包括:
接收用户发送的第一语音识别任务;查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
此外,为实现上述目的,本申请还提供一种语音识别***中的负载均衡实现装置,所述装置包括:
接收模块,用于接收用户发送的第一语音识别任务;查询模块,用于查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;发送模块,用于当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;所述接收模块,还用于接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;更新模块,用于将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
进一步地,本申请还提出一种计算机设备,所述计算机设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述计算机可读指令被所述处理器执行时实现步骤:
接收用户发送的第一语音识别任务;查询预设的任务执行列表中的每个语音识别服务 器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
进一步地,为实现上述目的,本申请还提供一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行步骤:
接收用户发送的第一语音识别任务;查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
本申请所提出的语音识别***中的负载均衡实现方法、装置、计算机设备及非易失性计算机可读存储介质,能够在接收到用户的语音识别任务之后,通过查询包括有所有语音识别服务器的编号、执行任务清单和CPU使用率的任务执行列表,然后选择CPU使用率最小的语音识别服务器用于执行所述语音识别任务,并且还会将所述语音识别服务器的反馈的任务执行情况和CPU使用率更新到所述任务执行列表,从而实现快速、实时、高效地实现语音识别***中的负载均衡。
附图说明
图1是本申请计算机设备一可选的硬件架构的示意图;
图2是本申请语音识别***中的负载均衡实现装置一实施例的程序模块示意图;
图3是本申请语音识别***中的负载均衡实现方法一实施例的流程示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
参阅图1所示,是本申请计算机设备1一可选的硬件架构的示意图。
本实施例中,所述计算机设备1可包括,但不仅限于,可通过***总线相互通信连接存储器11、处理器12、网络接口13。
所述计算机设备1通过网络接口13连接网络(图1未标出),通过网络连接到包括多个语音识别服务器的语音识别***,以及其他终端设备如移动终端(Mobile Terminal)、移动电话(Mobile Telephone)、用户设备(User Equipment,UE)、手机(handset)及便携设备(portable equipment)、PC端等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯***(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi、通话网络等无线或有线网络。
需要指出的是,图1仅示出了具有组件11-13的计算机设备1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,所述存储器11至少包括一种类型的非易失性计算机可读存储介质,所述非易失 性计算机可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器11可以是所述计算机设备1的内部存储单元,例如该计算机设备1的硬盘或内存。在另一些实施例中,所述存储器11也可以是所述计算机设备1的外部存储设备,例如该计算机设备1配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器11还可以既包括所述计算机设备1的内部存储单元也包括其外部存储设备。本实施例中,所述存储器11通常用于存储安装于所述计算机设备1的操作***和各类应用软件,例如语音识别***中的负载均衡实现装置200的程序代码等。此外,所述存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。
当所述存储器11存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行步骤:
接收用户发送的第一语音识别任务;查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述计算机设备1的总体操作,例如执行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行所述语音识别***中的负载均衡实现装置200等。
所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述 计算机设备1与以上所述的包括多个语音识别服务器的语音识别***,以及其他终端设备如移动终端、移动电话、用户设备、手机及便携设备,PC端等建立通信连接。
本实施例中,所述计算机设备1内安装并运行有语音识别***中的负载均衡实现装置200时,当所述语音识别***中的负载均衡实现装置200运行时,能够在接收到用户的语音识别任务之后,通过查询包括有所有语音识别服务器的编号、执行任务清单和CPU使用率的任务执行列表,然后选择CPU使用率最小的语音识别服务器用于执行所述语音识别任务,并且还会将所述语音识别服务器的反馈的任务执行情况和CPU使用率更新到所述任务执行列表,从而实现快速、实时、高效地实现语音识别***中的负载均衡。
至此,己经详细介绍了本申请各个实施例的应用环境和相关设备的硬件结构和功能。下面,将基于上述应用环境和相关设备,提出本申请的各个实施例。
首先,本申请提出一种语音识别***中的负载均衡实现装置200。
参阅图2所示,是本申请语音识别***中的负载均衡实现装置200一实施例的程序模块图。
本实施例中,所述语音识别***中的负载均衡实现装置200包括一系列的存储于存储器11上的计算机可读指令,当该计算机可读指令被处理器12执行时,可以实现本申请各实施例的语音识别***中的负载均衡实现功能。在一些实施例中,基于该计算机可读指令各部分所实现的特定的操作,语音识别***中的负载均衡实现装置200可以被划分为一个或多个模块。例如,在图2中,所述语音识别***中的负载均衡实现装置200可以被分割成接收模块201、查询模块202、发送模块203和更新模块204。其中:
所述接收模块201,用于接收用户发送的第一语音识别任务。
具体地,用户在移动终端或者PC端等终端设备上使用到语音识别功能时,所述终端设备则会生成语音识别任务,然后将所述语音识别任务发送至所述计算机设备1。在本实施例中,由于语音识别***包括几十个上百个语音识别服务器,因此,当用户发送第一语音识别任务给所述计算机设备1时,所述接收模块201接收用户发送的第一语音识别任务。
所述查询模块202,用于查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率。
具体地,所述计算机设备1预先设置一个任务执行列表,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率。在本实施例中,每个语音识别服务器的正在执行语音识别任务量以及CPU使用率,初始值分别设定为0个和0%,当语音识别服务器被分配语音识别任务之后,那么各个语音识别服务器的正在执行的语音识别任务清单和CPU使用率才会变得不一样。所述查询模块202则在所述接收模块201接收到用户发送的第一语音识别任务之后查询所述任务执行列表的所有语音识别服务器的CPU使用率。
所述发送模块203,用于当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器。
具体的,所述查询模块202在查询出所有的语音识别服务器的CPU使用率之后,所述发送模块203则会从所有的语音识别服务器中选择一个CPU使用率最小的语音识别服务器,然后将所述接收模块201接收到的第一语音识别任务发送至该语音识别服务器。在本实施例中,所述发送模块203,还用于当所述查询模块202查询出最小的CPU使用率有多个时,从多个所述最小CPU使用率的语音识别服务器中随机选择一个语音识别服务器用于处理所述第一语音识别任务。例如,所述查询模块202查询出所述任务执行列表中包括编号为101,201,301共3个语音识别服务器,其中101语音识别服务器正在执行的语音识别任务包括a,b,c,CPU使用率为30%;201语音识别服务器正在执行的语音识别任务包括x,y,z,w,CPU使用率为37%;301语音识别服务器正在执行的语音识别任务包括m,n,q,t,CPU使用率为50%。因此,所述发送模块203则会选择CPU使用率最小的编号为101语音识别服务器,然后将所述第一语音识别任务发送至101语音识别服务器。也就是说,所述发送模块203选择负载最小的语音识别服务器,然后将所述第一语音识别任务发送至该语音识别服务器进行语音识别任务。
当然,所述发送模块203,还用于当所述查询模块202查询出所述任务执行列表中的每个语音识别服务器的CPU使用率均高于预设的第一阈值时,比如90%,则拒绝接入语音识别任务,并将业务繁忙提示发送给所述用户,比如提示“现在忙,请稍后再重试”。通过这样的方式,避免了语音识别服务器负载过高,产生崩溃的情况。
所述接收模块201,还用于接收所述第一语音识别服务器反馈的所述第一语音识别任 务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率。所述更新模块204,用于将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
具体地,在所述发送模块203将所述第一语音识别任务发送至所述第一语音识别服务器之后,所述第一语音识别服务器则开始执行所述第一语音识别任务,然后还会将所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的CPU使用率反馈至所述计算机设备1。因此,所述接收模块201则接收所述第一语音识别服务器返回的所述第一语音识别任务正在处理的消息和所述第一语音识别服务器的第二CPU使用率。接着,所述更新模块204将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。例如,所述第一语音识别任务为h,所述101语音识别服务器原来的列表信息中包括正在执行的语音识别任务包括a,b,c,CPU使用率为30%;然后所述接收模块201接收到所述101语音识别服务器返回的语音识别任务h正在执行且即时CPU使用率为48%,那么所述更新模块204则将所述任务执行列表中101语音识别服务器的列表信息更新为:正在执行的语音识别任务包括a,b,c,h,CPU使用率为48%。
另外,所述接收模块201,还用于接收所述第一语音识别服务器执行完成第二语音识别任务的消息以及所述第一语音识别服务器即时的第三CPU使用率。所述更新模块204,还用于将所述第三CPU使用率和所述第二语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
具体的,当所述第一语音识别服务器在未接收到新的语音识别任务之前,正在执行的语音识别任务完成时,也会将该语音识别任务完成的信息以及即时CPU使用率发送给所述计算机设备1。例如,所述101语音识别服务器列表信息中包括正在执行的语音识别任务包括a,b,c,h,CPU使用率为48%;然后所述101语音识别服务器处理的语音识别任务a完成了,CPU使用率也变成40%,那么,所述101语音识别服务器则将语音识别任务a已完成且即时CPU使用率为40%发送至所述计算机设备1。所述接收模块201接收所述101语音识别服务器发送的这些信息,然后所述更新模块204则将所述任务执行列表中101语音识别服务器的列表信息更新为:正在执行的语音识别任务包括b,c,h,CPU使用率为 40%。
从上文可知,所述计算机设备1能够在接收到用户的语音识别任务之后,通过查询包括有所有语音识别服务器的编号、执行任务清单和CPU使用率的任务执行列表,然后选择CPU使用率最小的语音识别服务器用于执行所述语音识别任务,并且还会将所述语音识别服务器的反馈的任务执行情况和CPU使用率更新到所述任务执行列表,从而实现快速、实时、高效地实现语音识别***中的负载均衡。
此外,本申请还提出一种语音识别***中的负载均衡实现方法,所述方法应用于计算机设备。
参阅图3所示,是本申请语音识别***中的负载均衡实现方法一实施例的流程示意图。在本实施例中,根据不同的需求,图3所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。
步骤S500,接收用户发送的第一语音识别任务。
具体地,用户在移动终端或者PC端等终端设备上使用到语音识别功能时,所述终端设备则会生成语音识别任务,然后将所述语音识别任务发送至所述计算机设备。在本实施例中,由于语音识别***包括几十个上百个语音识别服务器,因此,当用户发送第一语音识别任务给所述计算机设备时,所述计算机设备接收用户发送的第一语音识别任务。
步骤S502,查询预设的任务执行列表中的每个语音识别服务器的CPU使用率。其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率。
具体地,所述计算机设备预先设置一个任务执行列表,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率。在本实施例中,每个语音识别服务器的正在执行语音识别任务量以及CPU使用率,初始值分别设定为0个和0%,当语音识别服务器被分配语音识别任务之后,那么各个语音识别服务器的正在执行的语音识别任务清单和CPU使用率才会变得不一样。所述计算机设备在接收到用户发送的第一语音识别任务之后进一步查询所述任务执行列表的所有语音识别服务器的CPU使用率。
步骤S504,当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语 音识别任务发送至所述第一语音识别服务器。
具体的,所述计算机设备在查询出所有的语音识别服务器的CPU使用率之后,则进一步从所有的语音识别服务器中选择一个CPU使用率最小的语音识别服务器,然后将接收到的第一语音识别任务发送至该语音识别服务器。在本实施例中,所述计算机设备在查询出最小的CPU使用率有多个时,从多个所述最小CPU使用率的语音识别服务器中随机选择一个语音识别服务器用于处理所述第一语音识别任务。例如,所述计算机设备查询出所述任务执行列表中包括编号为101,201,301共3个语音识别服务器,其中101语音识别服务器正在执行的语音识别任务包括a,b,c,CPU使用率为30%;201语音识别服务器正在执行的语音识别任务包括x,y,z,w,CPU使用率为37%;301语音识别服务器正在执行的语音识别任务包括m,n,q,t,CPU使用率为50%。因此,所述计算机设备则会选择CPU使用率最小的编号为101语音识别服务器,然后将所述第一语音识别任务发送至101语音识别服务器。也就是说,所述计算机设备选择负载最小的语音识别服务器,然后将所述第一语音识别任务发送至该语音识别服务器进行语音识别任务。
当然,所述计算机设备在查询出所述任务执行列表中的每个语音识别服务器的CPU使用率均高于预设的第一阈值时,比如90%,则拒绝接入语音识别任务,并将业务繁忙提示发送给所述用户,比如提示“现在忙,请稍后再重试”。通过这样的方式,避免了语音识别服务器负载过高,产生崩溃的情况。
步骤S506,接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率。
步骤S508,将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
具体地,所述计算机设备将所述第一语音识别任务发送至所述第一语音识别服务器之后,所述第一语音识别服务器则开始执行所述第一语音识别任务,然后还会将所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的CPU使用率反馈至所述计算机设备。所述计算机设备则接收所述第一语音识别服务器返回的所述第一语音识别任务正在处理的消息和所述第一语音识别服务器的第二CPU使用率。接着,所述更新模块204将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第 一语音识别服务器的列表信息。例如,所述第一语音识别任务为h,所述101语音识别服务器原来的列表信息中包括正在执行的语音识别任务包括a,b,c,CPU使用率为30%;然后所述计算机设备接收到所述101语音识别服务器返回的语音识别任务h正在执行且即时CPU使用率为48%,则进一步将所述任务执行列表中101语音识别服务器的列表信息更新为:正在执行的语音识别任务包括a,b,c,h,CPU使用率为48%。
另外,所述计算机设备还会接收所述第一语音识别服务器执行完成第二语音识别任务的消息以及所述第一语音识别服务器即时的第三CPU使用率。然后将所述第三CPU使用率和所述第二语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
具体的,当所述第一语音识别服务器在未接收到新的语音识别任务之前,正在执行的语音识别任务完成时,也会将该语音识别任务完成的信息以及即时CPU使用率发送给所述计算机设备。例如,所述101语音识别服务器列表信息中包括正在执行的语音识别任务包括a,b,c,h,CPU使用率为48%;然后所述101语音识别服务器处理的语音识别任务a完成了,CPU使用率也变成40%,那么,所述101语音识别服务器则将语音识别任务a已完成且即时CPU使用率为40%发送至所述计算机设备。所述计算机设备接收所述101语音识别服务器发送的这些信息,则将所述任务执行列表中101语音识别服务器的列表信息更新为:正在执行的语音识别任务包括b,c,h,CPU使用率为40%。
本实施例所提出的语音识别***中的负载均衡实现方法,能够在接收到用户的语音识别任务之后,通过查询包括有所有语音识别服务器的编号、执行任务清单和CPU使用率的任务执行列表,然后选择CPU使用率最小的语音识别服务器用于执行所述语音识别任务,并且还会将所述语音识别服务器的反馈的任务执行情况和CPU使用率更新到所述任务执行列表,从而实现快速、实时、高效地实现语音识别***中的负载均衡。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如 ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种语音识别***中的负载均衡实现方法,所述方法包括以下步骤:
    接收用户发送的第一语音识别任务;
    查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;
    当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;
    接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;
    将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
  2. 如权利要求1所述的语音识别***中的负载均衡实现方法,所述方法还包括:
    接收所述第一语音识别服务器执行完成第二语音识别任务的消息以及所述第一语音识别服务器即时的第三CPU使用率;
    将所述第三CPU使用率和所述第二语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
  3. 如权利要求1所述的语音识别***中的负载均衡实现方法,所述方法还包括:
    当查询出最小的CPU使用率有多个时,从多个所述最小CPU使用率的语音识别服务器中随机选择一个语音识别服务器用于处理所述第一语音识别任务。
  4. 如权利要求1所述的语音识别***中的负载均衡实现方法,所述方法还包括:
    当查询出所述任务执行列表中的每个语音识别服务器的CPU使用率均高于预设的第一阈值时,则拒绝接入语音识别任务,并将业务繁忙提示发送给所述用户。
  5. 如权利要求1所述的语音识别***中的负载均衡实现方法,所述任务执行列表中的每个语音识别服务器的正在执行语音识别任务量以及CPU使用率,初始值分别为0个和0%。
  6. 一种语音识别***中的负载均衡实现装置,所述装置包括:
    接收模块,用于接收用户发送的第一语音识别任务;
    查询模块,用于查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;
    发送模块,用于当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;
    所述接收模块,还用于接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;
    更新模块,用于将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
  7. 如权利要求6所述的语音识别***中的负载均衡实现装置,
    所述接收模块,还用于接收所述第一语音识别服务器执行完成第二语音识别任务的消息以及所述第一语音识别服务器即时的第三CPU使用率;
    所述更新模块,还用于将所述第三CPU使用率和所述第二语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
  8. 如权利要求6所述的语音识别***中的负载均衡实现装置,
    所述发送模块,还用于当查询出最小的CPU使用率有多个时,从多个所述最小CPU使用率的语音识别服务器中随机选择一个语音识别服务器用于处理所述第一语音识别任务。
  9. 如权利要求6所述的语音识别***中的负载均衡实现装置,
    所述发送模块,还用于当查询出所述任务执行列表中的每个语音识别服务器的CPU使用率均高于预设的第一阈值时,则拒绝接入语音识别任务,并将业务繁忙提示发送给所述用户。
  10. 如权利要求6所述的语音识别***中的负载均衡实现装置,所述任务执行列表中的每个语音识别服务器的正在执行语音识别任务量以及CPU使用率,初始值分别为0个和0%。
  11. 一种计算机设备,所述计算机设备包括存储器、处理器,所述存储器上存储 有可在所述处理器上运行的计算机可读指令,所述计算机可读指令被所述处理器执行时实现步骤:
    接收用户发送的第一语音识别任务;
    查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;
    当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;
    接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;
    将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
  12. 如权利要求11所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现步骤:
    接收所述第一语音识别服务器执行完成第二语音识别任务的消息以及所述第一语音识别服务器即时的第三CPU使用率;
    将所述第三CPU使用率和所述第二语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
  13. 如权利要求11所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现步骤:
    当查询出最小的CPU使用率有多个时,从多个所述最小CPU使用率的语音识别服务器中随机选择一个语音识别服务器用于处理所述第一语音识别任务。
  14. 如权利要求11所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现步骤:
    当查询出所述任务执行列表中的每个语音识别服务器的CPU使用率均高于预设的第一阈值时,则拒绝接入语音识别任务,并将业务繁忙提示发送给所述用户。
  15. 如权利要求11所述的计算机设备,所述任务执行列表中的每个语音识别服务器 的正在执行语音识别任务量以及CPU使用率,初始值分别为0个和0%。
  16. 一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行步骤:
    接收用户发送的第一语音识别任务;
    查询预设的任务执行列表中的每个语音识别服务器的CPU使用率,其中,所述任务执行列表包括所有语音识别服务器的列表信息,所述列表信息包括:语音识别器的编号、正在执行的语音识别任务清单以及CPU使用率;
    当查询出第一语音识别服务器的第一CPU使用率为最小时,将所述第一语音识别任务发送至所述第一语音识别服务器;
    接收所述第一语音识别服务器反馈的所述第一语音识别任务正在处理的消息以及所述第一语音识别服务器即时的第二CPU使用率;
    将所述第二CPU使用率和所述第一语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
  17. 如权利要求16所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现步骤:
    接收所述第一语音识别服务器执行完成第二语音识别任务的消息以及所述第一语音识别服务器即时的第三CPU使用率;
    将所述第三CPU使用率和所述第二语音识别任务更新到所述任务执行列表中对应于所述第一语音识别服务器的列表信息。
  18. 如权利要求16所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现步骤:
    当查询出最小的CPU使用率有多个时,从多个所述最小CPU使用率的语音识别服务器中随机选择一个语音识别服务器用于处理所述第一语音识别任务。
  19. 如权利要求16所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现步骤:
    当查询出所述任务执行列表中的每个语音识别服务器的CPU使用率均高于预设的 第一阈值时,则拒绝接入语音识别任务,并将业务繁忙提示发送给所述用户。
  20. 如权利要求16所述的非易失性计算机可读存储介质,所述任务执行列表中的每个语音识别服务器的正在执行语音识别任务量以及CPU使用率,初始值分别为0个和0%。
PCT/CN2019/117557 2019-07-19 2019-11-12 语音识别***中的负载均衡实现方法、装置以及计算机设备 WO2021012506A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910655562.2A CN110428840A (zh) 2019-07-19 2019-07-19 语音识别***中的负载均衡实现方法、装置以及计算机设备
CN201910655562.2 2019-07-19

Publications (1)

Publication Number Publication Date
WO2021012506A1 true WO2021012506A1 (zh) 2021-01-28

Family

ID=68411182

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117557 WO2021012506A1 (zh) 2019-07-19 2019-11-12 语音识别***中的负载均衡实现方法、装置以及计算机设备

Country Status (2)

Country Link
CN (1) CN110428840A (zh)
WO (1) WO2021012506A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110428840A (zh) * 2019-07-19 2019-11-08 平安科技(深圳)有限公司 语音识别***中的负载均衡实现方法、装置以及计算机设备
CN114138471B (zh) * 2021-11-18 2024-04-19 苏州浪潮智能科技有限公司 一种软件业务绑定cpu核心的方法及相关装置
CN116319505A (zh) * 2023-02-10 2023-06-23 安芯网盾(北京)科技有限公司 路由分发方法及装置

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6119087A (en) * 1998-03-13 2000-09-12 Nuance Communications System architecture for and method of voice processing
US20020087325A1 (en) * 2000-12-29 2002-07-04 Lee Victor Wai Leung Dialogue application computer platform
CN1968266A (zh) * 2006-06-05 2007-05-23 华为技术有限公司 一种媒体资源服务器的资源管理***及方法
CN1988548A (zh) * 2005-12-21 2007-06-27 国际商业机器公司 用于处理语音处理请求的方法和***
CN103150213A (zh) * 2011-12-06 2013-06-12 北大方正集团有限公司 负载平衡方法和装置
CN103325371A (zh) * 2013-06-05 2013-09-25 杭州网豆数字技术有限公司 基于云的语音识别***与方法
CN109462647A (zh) * 2018-11-12 2019-03-12 平安科技(深圳)有限公司 基于数据分析的资源分配方法、装置和计算机设备
CN110428840A (zh) * 2019-07-19 2019-11-08 平安科技(深圳)有限公司 语音识别***中的负载均衡实现方法、装置以及计算机设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109816423A (zh) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 基于语音识别的产品规划方法及服务器

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6119087A (en) * 1998-03-13 2000-09-12 Nuance Communications System architecture for and method of voice processing
US20020087325A1 (en) * 2000-12-29 2002-07-04 Lee Victor Wai Leung Dialogue application computer platform
CN1988548A (zh) * 2005-12-21 2007-06-27 国际商业机器公司 用于处理语音处理请求的方法和***
CN1968266A (zh) * 2006-06-05 2007-05-23 华为技术有限公司 一种媒体资源服务器的资源管理***及方法
CN103150213A (zh) * 2011-12-06 2013-06-12 北大方正集团有限公司 负载平衡方法和装置
CN103325371A (zh) * 2013-06-05 2013-09-25 杭州网豆数字技术有限公司 基于云的语音识别***与方法
CN109462647A (zh) * 2018-11-12 2019-03-12 平安科技(深圳)有限公司 基于数据分析的资源分配方法、装置和计算机设备
CN110428840A (zh) * 2019-07-19 2019-11-08 平安科技(深圳)有限公司 语音识别***中的负载均衡实现方法、装置以及计算机设备

Also Published As

Publication number Publication date
CN110428840A (zh) 2019-11-08

Similar Documents

Publication Publication Date Title
WO2021012506A1 (zh) 语音识别***中的负载均衡实现方法、装置以及计算机设备
CN105468302B (zh) 一种处理数据的方法、装置及***
US11044729B2 (en) Function scheduling method, device, and system
CN112395107A (zh) 税控设备控制的方法、装置、存储介质及电子设备
WO2021057064A1 (zh) 基于人工智能的数据交互转换方法、装置、设备及介质
CN115550354A (zh) 一种数据处理方法、装置及计算机可读存储介质
WO2019047708A1 (zh) 资源配置方法及相关产品
CN108536544B (zh) 基于数据库消息队列的消费方法、装置、服务器和介质
CN111445331A (zh) 交易撮合方法及装置
CN103327199A (zh) 实现外呼的方法、装置和***
CN111586140A (zh) 一种数据交互的方法及服务器
CN109951551B (zh) 一种容器镜像管理***及方法
CN112787828B (zh) 一种应用程序的流量统计方法、设备、移动电子设备
US8510426B2 (en) Communication and coordination between web services in a cloud-based computing environment
CN111885564B (zh) 数据传输方法、设备升级方法、计算机可读的存储介质
CN110381150B (zh) 区块链上的数据处理方法、装置、电子设备及存储介质
CN112148426A (zh) 一种带宽分配方法及装置
CN111245928A (zh) 基于超融合架构的资源调节方法、物联网服务器及介质
CN110413610A (zh) 提高业务数据报表导出效率的方法及***、数据库服务器
CN102053917B (zh) 一种降低内存占用的智能卡及其处理指令的方法
CN113890906A (zh) 呼叫转移方法及装置、电子设备、计算机可读存储介质
WO2020211358A1 (zh) 数据库调度方法、装置、计算机设备及存储介质
CN111176679B (zh) 一种应用程序更新方法和装置
CN114222028A (zh) 语音识别方法、装置、计算机设备和存储介质
CN113747383A (zh) 一种多张sim卡流量通用方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19938832

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19938832

Country of ref document: EP

Kind code of ref document: A1