WO2020098100A1 - Method and apparatus for allocating resources on basis of data analysis, and computer device - Google Patents

Method and apparatus for allocating resources on basis of data analysis, and computer device Download PDF

Info

Publication number
WO2020098100A1
WO2020098100A1 PCT/CN2018/124400 CN2018124400W WO2020098100A1 WO 2020098100 A1 WO2020098100 A1 WO 2020098100A1 CN 2018124400 W CN2018124400 W CN 2018124400W WO 2020098100 A1 WO2020098100 A1 WO 2020098100A1
Authority
WO
WIPO (PCT)
Prior art keywords
voice recognition
recognition server
voice
recognized
data
Prior art date
Application number
PCT/CN2018/124400
Other languages
French (fr)
Chinese (zh)
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 WO2020098100A1 publication Critical patent/WO2020098100A1/en

Links

Classifications

    • 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
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; 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
    • 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

Definitions

  • This application relates to the field of speech recognition, and in particular to a resource allocation method, device and computer equipment based on data analysis.
  • Voice recognition technology refers to the technology that allows the machine to convert the voice signal into the corresponding text or command through recognition and understanding, that is, to let the machine understand human speech.
  • the load balancer is used to distribute the received voice recognition request to the voice recognition server, and the voice recognition server is used to process the received voice recognition request.
  • the IVR Interactive Voice Response
  • the load balancer will use the polling method to call the voice recognition server, that is, select one of multiple voice recognition servers to process the received Voice recognition request to achieve load balancing of each voice recognition server.
  • polling can only be allocated based on the number of interactions, and the length of each interaction may vary greatly, because the load balancer does not select a reasonable voice recognition server to process the entry based on the actual use of the resources of each voice recognition server.
  • Voice recognition request it is easy to cause uneven resource allocation of each voice recognition server, and the processing efficiency of voice recognition request is not high.
  • the main purpose of the present application is to provide a resource allocation method, device and computer equipment based on data analysis, aiming to solve the existing technical problem of uneven resource allocation to the voice recognition server and low processing efficiency of voice recognition requests.
  • this application proposes a resource allocation method based on data analysis, including:
  • IVR Interactive Voice Response
  • This application also provides a resource allocation device based on data analysis, including:
  • the first receiving module is used to receive the voice recognition request sent by the IVR system
  • the first calculation module is used to separately calculate the total duration of the current voice data to be recognized by each voice recognition server;
  • the first comparison module is used to compare each of the total durations to obtain a voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration to be used for processing The first voice recognition server for the voice recognition request;
  • the first distribution module is configured to distribute the recognition request to the first voice recognition server.
  • the present application also provides a computer device, including a memory and a processor, where the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the foregoing method are implemented.
  • the present application also provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps of the above method are implemented.
  • the resource allocation method, device, computer equipment and storage medium based on data analysis provided in this application receive the voice recognition request sent by the IVR system; respectively calculate the total duration of the current voice data to be recognized by each voice recognition server; Compare the total duration, determine the voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration as the first voice recognition server for processing the voice recognition request;
  • the recognition request is distributed to the first voice recognition server.
  • This application selects a reasonable voice recognition server to process the received voice recognition request through comparative analysis of the current total length of voice data to be recognized by each voice recognition server, which is conducive to achieving a balanced use of the voice recognition server's resources and improving voice Identify the processing efficiency of the request.
  • FIG. 1 is a schematic flowchart of a resource allocation method based on data analysis according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a resource allocation method based on data analysis according to another embodiment of the present application
  • FIG. 3 is a schematic block diagram of a structure of a resource allocation device based on data analysis according to an embodiment of the present application
  • FIG. 4 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • an embodiment of the present application provides a resource allocation method based on data analysis, including the following steps:
  • S2 Calculate the total duration of the current voice data to be recognized by each voice recognition server separately;
  • S4 Distribute the voice recognition request to the first voice recognition server.
  • the execution subject of this embodiment is a resource allocation device based on data analysis, which may specifically be a load balancer.
  • the load balancer is used to receive IVR (Interactive Voice Response (interactive voice response) voice recognition request sent by the system, and distribute the voice recognition request to the voice recognition server, so that the voice recognition server processes the voice recognition request.
  • IVR Interactive Voice Response
  • the load balancer needs to establish a connection with the IVR system to realize information interaction with the IVR system.
  • the method for establishing the connection between the load balancer and the IVR system may be: carrying the identification resource information in the sdp message of the load balancer to establish the connection between the load balancer and the IVR system, wherein the sdp message establishes a session connection for the IVR system The message body used at the time; or directly configure the load pool in the IVR system, so that the IVR system can directly establish a connection with the load balancer through the load pool.
  • the load balancer analyzes the actual resource utilization rate of each voice recognition server.
  • the actual resource utilization rate is reflected by the duration data of the voice data to be recognized by each voice recognition server, that is, by analyzing and calculating the total duration of the current voice data to be recognized by each voice recognition server, because the load balancer records
  • the data information includes the duration of each voice data, and each voice recognition server corresponding to each voice data sent, by processing the voice that each voice recognition server needs to process
  • the duration of the data minus the duration of the processed voice data that has been returned to the load balancer, the difference is the total duration of the current voice data to be processed by each voice recognition server.
  • a comparative analysis of the total duration of the recognized voice data can determine the voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration as the first voice for processing the voice recognition request Identify the server.
  • the resource utilization rate of the voice recognition server is expressed by the amount of voice data. For example, the voice recognition server A1 has 2 voice data to be recognized, and the voice recognition server A2 has 5 voice data to be recognized.
  • the load balancer will distribute the voice recognition request to the voice recognition server A1 with a small amount of voice data to be recognized, but the load balancer will not analyze the voice recognition to be recognized in the voice recognition servers A1 and A2 The duration of the data.
  • the resources of the voice recognition server A1 are actually used The rate is greater than the voice recognition server A2. It can be seen that the existing resource allocation method for the voice recognition server is unreasonable. At this time, the recognition request should be distributed to the voice recognition server A2 with a smaller actual resource utilization rate. It is beneficial to realize the balanced distribution of resources of the speech recognition server.
  • This embodiment uses the total duration of the voice data to be recognized to characterize the actual resource utilization rate, which can accurately reflect the current actual use of resources of each voice recognition server, and according to the current actual use of resources of each voice recognition server, Distributing the voice recognition request reasonably to the voice recognition server with a low actual utilization rate of resources is conducive to achieving a balanced use of the resource of the voice recognition server and improving the processing efficiency of the voice recognition request.
  • step S4 after the above step S4, it includes:
  • S400 Determine whether there is a second voice recognition server whose total duration of the voice data to be recognized is greater than a preset duration threshold
  • the preset preset duration threshold represents the maximum number of voice data durations that can be processed by the voice recognition server. If the voice recognition server processes voice data within a long period of time, the number of durations is greater than this
  • the preset duration threshold means that the voice recognition server is in an overloaded working state for a long time, and the voice recognition server will be severely damaged or even scrapped. In order to ensure that the voice recognition server can maintain a good service life, the load balancer needs to monitor the working status of each voice recognition server at all times.
  • the second voice recognition server When it is found that there is a second voice recognition server whose first total duration of voice data to be recognized is greater than a preset duration threshold, Will move the second voice recognition server into a blacklist that does not receive new voice recognition requests temporarily, that is, no new voice recognition request will be distributed to the second voice recognition server for a period of time, only when the second voice After the total duration of the voice data to be processed in the recognition server is less than the preset duration threshold, the second voice recognition server is removed from the blacklist.
  • the load balancer monitors that a voice recognition server is in an overloaded working state, it will intelligently stop distributing new voice recognition requests to the voice recognition server to effectively protect the voice recognition server to ensure The service life of the voice recognition server.
  • step S401 it includes:
  • S402 Calculate the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server;
  • S403 Filter out the third voice recognition server whose total duration of the voice data to be recognized is less than the average duration
  • S405 If yes, allocate part of the voice data to be recognized in the second voice recognition server to the third voice recognition server, so that the total voice data to be recognized in the second voice recognition server after distribution The duration is less than the preset duration threshold.
  • the step of calculating the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server is specifically The total duration of the voice data to be recognized by the voice recognition server is summed to obtain the sum value, and then the sum is divided by the number of all voice recognition servers to obtain the average duration.
  • the preset first preset time indicates that the voice recognition processor is in an overloaded working state within the first preset time, and hardly causes damage to the voice recognition processor itself.
  • the second speech recognition server processes the speech data to be recognized, if after the first preset time passes, the total duration of the remaining speech data to be recognized in the second speech recognition server is less than the preset duration threshold, It means that the second voice recognition server has not been in overload working state for a long time; and if after the first preset time is exceeded, the total duration of the voice data to be recognized remaining in the second voice recognition server is still greater than the preset duration
  • the threshold value indicates that the second voice recognition server is in an overloaded working state for a long time, which will greatly affect the service life of the second voice recognition server itself.
  • the third voice recognition server is a voice recognition server whose total duration of voice data to be recognized is less than the average duration, wherein the part of the voice data to be recognized may be any part of all the voice data to be recognized in the second voice recognition server
  • the duration of the part of the voice data to be recognized that needs to be allocated is greater than or equal to the specified duration, which is the total of the voice data to be recognized in the second voice recognition server after the first preset time The difference between the duration and the preset duration threshold.
  • part of the voice data to be recognized in the second voice recognition server is allocated to the third voice recognition server whose total duration of the voice data to be recognized is less than the average duration.
  • the number of the third voice recognition server depends on the actual situation, specifically: Analyze the actual duration data of the voice data in the second voice recognition server.
  • part of the voice data to be recognized in the voice recognition server can only be allocated to the total duration of the voice data to be recognized A designated voice recognition server that is less than the average duration, and ensures that after the second voice recognition server is allocated, the total duration of the remaining voice data to be recognized after the processing of the first preset time is less than the preset duration Threshold; or if the actual duration data is too large, part of the voice data to be recognized in the second voice recognition server may be allocated to multiple designated voice recognition servers whose total duration is less than the average duration (specific number Set according to the actual situation), and ensure that after the second speech recognition server has been allocated, the total duration of the remaining speech data to be recognized can be less than the preset duration threshold after the first preset time is processed.
  • the voice recognition server By allocating part of the voice data to be recognized in the voice recognition server with a load greater than a preset value to one or more designated voice recognition servers with a small load, the service life of the voice recognition server with a large load is effectively ensured. It also further promotes the balanced use of resources of each speech recognition server.
  • step S4 after the above step S4, it includes:
  • S412 Determine a fourth voice recognition server for processing the recognition request according to the comparison result, where the fourth voice recognition server is in a normal working state;
  • S413 Distribute the voice recognition request to the fourth voice recognition server.
  • the load balancer determines to distribute the voice recognition request to the first voice recognition server, there may be a situation where the first voice recognition server is not in a normal working state, then the first voice recognition server will Unable to respond to the voice recognition request and the subsequent recognition of the voice data corresponding to the voice recognition request, the entire recognition process cannot work normally, and the IVR system cannot receive the recognition result of the first voice recognition server, Moreover, the user cannot get the response of the IVR system in time, resulting in poor user experience. Therefore, in this embodiment, it is necessary to further determine whether the first voice recognition server is in a normal working state.
  • the first voice recognition server is excluded and the first voice
  • the actual utilization rate of the resources of the voice recognition servers other than the recognition server is analyzed to determine a fourth voice recognition server for processing the voice recognition request, wherein the total duration of the current voice data of the fourth voice recognition server to be recognized is The least among the other voice recognition servers mentioned above, and after confirming that the fourth voice recognition server is in a normal working state, distribute the voice recognition request to the fourth voice recognition server so that the fourth voice recognition server can correspond deal with.
  • the voice recognition request is processed by calling the fourth voice recognition server in a normal working state, which is beneficial to the normal operation of the recognition process, and the IVR system can receive it in time
  • the recognition result of the fourth voice recognition server, and the user can also get the response of the IVR system in time, ensuring the user's experience.
  • step S412 includes:
  • S4120 Sort the other speech recognition servers in order of the total duration of the speech data to be recognized from small to large;
  • S4121 Traverse the other speech recognition servers according to the sorting
  • the step of determining the fourth voice recognition server for processing the voice recognition request according to the above comparison result specifically includes: when the first voice recognition server is in an inoperable state, remove Analyze the total duration of each voice recognition server other than a voice recognition server, and sort the other voice recognition servers according to the order of the total duration of the voice data to be recognized from small to large, in increasing order, and traverse according to the sorting For each of the other voice recognition servers mentioned above, each time a voice recognition server is traversed, if it is determined that the voice recognition server is in a normal working state, the voice recognition server is determined as the fourth voice recognition for processing the voice recognition request The server distributes the voice recognition request to the voice recognition server for processing, and stops traversing.
  • step S1 before the above step S1, it includes:
  • S100 Establish a long TCP (transmission control protocol) connection with each of the voice recognition servers, so as to perform information interaction with each of the voice recognition servers through the long TCP connection.
  • TCP transmission control protocol
  • TCP Transmission Control Protocol
  • Transmission Control Protocol Transmission Control Protocol
  • at least one TCP long connection can be established with each voice recognition server, where the specific number of established TCP long connections is determined according to the actual situation.
  • the transmission control protocol established above can be used directly Long connection, through the transmission control protocol, the long connection performs information interaction with the voice recognition server, thereby eliminating the cost of establishing a long transmission control protocol connection when a load balancer is required to call the voice recognition server time.
  • the specific value of the number of long transmission control protocol connections established between the load balancer and each voice recognition server may be determined according to actual needs, and may be one or more. For example, load balancing The server establishes a long transmission control protocol connection with the voice recognition server A, the load balancer establishes two long transmission control protocol connections with the voice recognition server B, and the load balancer establishes five long transmission control protocol connections with the voice recognition server C .
  • the advantage of establishing multiple transmission control protocol long connections is that when the load balancer simultaneously receives multiple voice recognition requests corresponding to multiple voice data sent by the IVR system, and determines that multiple voice recognition requests need to be from the same voice
  • multiple transmission control protocol long connections can be used to distribute multiple voice recognition requests to the voice recognition server at the same time, and if there is only one transmission control protocol long connection, only one speech recognition can be distributed. After the request, another voice recognition request is distributed until the multiple voice recognition requests are distributed, so establishing a certain number of long transmission control protocol connections can effectively improve the transmission efficiency of the voice recognition request.
  • step S4 after the above step S4, it includes:
  • S420 Determine whether the response information for the voice recognition request fed back by the first voice recognition server is received
  • S422 Receive voice data corresponding to the voice recognition request sent by the IVR system
  • S423 Send the voice data to the first voice recognition server, so that the first voice recognition server recognizes the voice data.
  • the first voice recognition server will parse the syntax of the voice recognition request, and if the parsing is successful, it will return to the load balancer The request identifies successful response information, and if the resolution fails, an error is returned to the load balancer. After receiving the response information, the load balancer will forward the response information to the IVR system. After receiving the response information, the IVR system will send the voice data corresponding to the voice recognition request to the load balancer.
  • the equalizer After receiving the voice data, the equalizer will forward it to the first voice recognition server, and then the first voice recognition server will recognize the voice data using the corresponding language model according to the grammar, obtain the recognition result, and The recognition result is returned to the load balancer, so that the load balancer returns the recognition result to the IVR system, so that the IVR system performs information interaction with the user according to the recognition result.
  • the IVR system before the step of receiving the voice recognition request sent by the IVR system, the IVR system sends heartbeat information to the load balancer. After receiving the heartbeat information sent by the IVR system, the load balancer It will determine whether it can send feedback information about the heartbeat information. If not, the load balancer will issue an alarm message that recognizes the voice data recognition request sent by the IVR through the second load balancer.
  • the above-mentioned load balancer is the main load balancer, and correspondingly sets at least one backup load balancer, that is, the above-mentioned second load balancer.
  • the active load balancer receives the heartbeat information sent by the IVR system and determines that it is malfunctioning, and cannot send feedback information on the heartbeat information, it will automatically send an alarm message to request fast Obtain the corresponding maintenance.
  • the active load balancer will also issue an alarm message to receive the voice recognition request sent by the IVR system through the backup load balancer.
  • IVR system learns that the main load balancer has failed, IVR will recognize the voice The request is sent to the backup load balancer.
  • the backup load balancer will work instead of the main load balancer to receive the voice data recognition request sent by the IVR and perform subsequent processing, and the actual resource utilization rate of each voice recognition server Analysis, determine the first voice recognition server for processing the recognition request, and distribute the recognition request to the first voice recognition server.
  • the backup load balancer can also actively detect whether the main load balancer sends feedback information on heartbeat information. When it is determined that the main load balancer has failed, that is, it cannot work normally, it can directly replace the main load balancer. The device works to remind the IVR system to send the voice data recognition request to the backup load balancer.
  • the resource allocation method based on data analysis in the embodiment of the present application selects a reasonable voice recognition server to process the received voice recognition request by comparing and analyzing the total duration of the current voice data to be recognized by each voice recognition server, which is beneficial to achieve
  • the balanced use of the resources of the voice recognition server improves the efficiency of processing voice recognition requests.
  • an embodiment of the present application further provides a resource allocation device based on data analysis, including:
  • the first receiving module 1 is used to receive a voice recognition request sent by an IVR (Interactive Voice Response) system;
  • IVR Interactive Voice Response
  • the first calculation module 2 separately calculates the total duration of the current voice data to be recognized by each voice recognition server;
  • the first comparison module 3 is used to compare the total durations, determine the voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration as the The first voice recognition server for the voice recognition request;
  • the first distribution module 4 is configured to distribute the voice recognition request to the first voice recognition server.
  • the execution subject of this embodiment is a resource allocation device based on data analysis, which may specifically be a load balancer.
  • the load balancer is used to receive IVR (Interactive Voice Response (interactive voice response) voice recognition request sent by the system, and distribute the voice recognition request to the voice recognition server, so that the voice recognition server processes the voice recognition request.
  • IVR Interactive Voice Response
  • the load balancer needs to establish a connection with the IVR system to realize information interaction with the IVR system.
  • the method for establishing the connection between the load balancer and the IVR system may be: carrying the identification resource information in the sdp message of the load balancer to establish the connection between the load balancer and the IVR system, wherein the sdp message establishes a session connection for the IVR system The message body used at the time; or directly configure the load pool in the IVR system, so that the IVR system can directly establish a connection with the load balancer through the load pool.
  • the load balancer after receiving the voice recognition request sent by the IVR system, the load balancer analyzes the actual resource utilization rate of each voice recognition server.
  • the actual resource utilization rate is reflected by the duration data of the voice data to be recognized by each voice recognition server, that is, by analyzing and calculating the total duration of the current voice data to be recognized by each voice recognition server, because the load balancer records
  • the data information includes the duration of each voice data, and each voice recognition server corresponding to each voice data sent, by processing the voice that each voice recognition server needs to process
  • the duration of the data minus the duration of the processed voice data that has been returned to the load balancer, the difference is the total duration of the current voice data to be processed by each voice recognition server.
  • a comparative analysis of the total duration of the recognized voice data can determine the voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration as the first voice for processing the voice recognition request Identify the server.
  • the resource utilization rate of the voice recognition server is expressed by the amount of voice data. For example, the voice recognition server A1 has 2 voice data to be recognized, and the voice recognition server A2 has 5 voice data to be recognized.
  • the load balancer will distribute the voice recognition request to the voice recognition server A1 with a small amount of voice data to be recognized, but the load balancer will not analyze the voice recognition to be recognized in the voice recognition servers A1 and A2 The duration of the data.
  • the resources of the voice recognition server A1 are actually used The rate is greater than the voice recognition server A2. It can be seen that the existing resource allocation method for the voice recognition server is unreasonable. At this time, the recognition request should be distributed to the voice recognition server A2 with a smaller actual resource utilization rate. It is beneficial to realize the balanced distribution of resources of the speech recognition server.
  • This embodiment uses the total duration of the voice data to be recognized to characterize the actual resource utilization rate, which can accurately reflect the current actual use of resources of each voice recognition server, and according to the current actual use of resources of each voice recognition server, Distributing the voice recognition request reasonably to the voice recognition server with a low actual utilization rate of resources is conducive to achieving a balanced use of the resource of the voice recognition server and improving the processing efficiency of the voice recognition request.
  • the above resource allocation device based on data analysis includes:
  • a first judgment module configured to judge whether there is a second voice recognition server whose total duration of the voice data to be recognized is greater than a preset duration threshold
  • the joining module is used to add the second speech recognition server to the blacklist that prohibits the processing of new speech recognition requests if it is.
  • the preset preset duration threshold represents the maximum number of voice data durations that can be processed by the voice recognition server. If the voice recognition server processes voice data within a long period of time, the number of durations is greater than this
  • the preset duration threshold means that the voice recognition server is in an overloaded working state for a long time, and the voice recognition server will be severely damaged or even scrapped. In order to ensure that the voice recognition server can maintain a good service life, the load balancer needs to monitor the working status of each voice recognition server at all times.
  • the second voice recognition server When it is found that there is a second voice recognition server whose first total duration of voice data to be recognized is greater than a preset duration threshold, Will move the second voice recognition server into a blacklist that does not receive new voice recognition requests temporarily, that is, no new voice recognition request will be distributed to the second voice recognition server for a period of time, only when the second voice After the total duration of the voice data to be processed in the recognition server is less than the preset duration threshold, the second voice recognition server is removed from the blacklist.
  • the load balancer monitors that a voice recognition server is in an overloaded working state, it will intelligently stop distributing new voice recognition requests to the voice recognition server to effectively protect the voice recognition server to ensure The service life of the voice recognition server.
  • the above resource allocation device based on data analysis includes:
  • a second calculation module configured to calculate the average duration of voice data to be recognized by each of the voice recognition servers according to the total duration of voice data to be recognized by each of the voice recognition servers;
  • a screening module configured to screen out a third voice recognition server whose total duration of voice data to be recognized is less than the average duration
  • a second judgment module configured to judge whether the total duration of the voice data to be recognized in the second voice recognition server is greater than the preset duration threshold after the first preset time has passed;
  • the distribution module is configured to, if it is, distribute part of the voice data to be recognized in the second voice recognition server to the third voice recognition server, so that the distributed voice to be recognized in the second voice recognition server The total duration of the data is less than the preset duration threshold.
  • the step of calculating the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server is specifically The total duration of the voice data to be recognized by all current voice recognition servers is summed to obtain a sum value, and then the sum is divided by the number of all voice recognition servers to obtain the average duration.
  • a voice recognition server whose total duration of voice data to be recognized is less than the average duration, wherein the number of voice recognition servers is determined by actual conditions.
  • the preset first preset time indicates that the voice recognition processor is in an overloaded working state within the first preset time, and almost does not cause damage to the voice recognition processor itself .
  • the second speech recognition server processes the speech data to be recognized, if after the first preset time passes, the total duration of the remaining speech data to be recognized in the second speech recognition server is less than the preset duration threshold, It means that the second voice recognition server has not been in overload working state for a long time; and if after the first preset time is exceeded, the total duration of the voice data to be recognized remaining in the second voice recognition server is still greater than the preset duration
  • the threshold value indicates that the second voice recognition server is in an overloaded working state for a long time, which will greatly affect the service life of the second voice recognition server itself.
  • the third voice recognition server is a voice recognition server whose total duration of voice data to be recognized is less than the average duration, wherein the part of the voice data to be recognized may be any part of all the voice data to be recognized in the second voice recognition server
  • the duration of the part of the voice data to be recognized that needs to be allocated is greater than or equal to the specified duration, which is the total of the voice data to be recognized in the second voice recognition server after the first preset time The difference between the duration and the preset duration threshold.
  • part of the voice data to be recognized in the second voice recognition server is allocated to the third voice recognition server whose total duration of the voice data to be recognized is less than the average duration.
  • the number of the third voice recognition server depends on the actual situation, specifically: Analyze the actual duration data of the voice data in the second voice recognition server.
  • part of the voice data to be recognized in the voice recognition server can only be allocated to the total duration of the voice data to be recognized A designated voice recognition server that is less than the average duration, and ensures that after the second voice recognition server is allocated, the total duration of the remaining voice data to be recognized after the processing of the first preset time is less than the preset duration Threshold; or if the actual duration data is too large, part of the voice data to be recognized in the second voice recognition server may be allocated to multiple designated voice recognition servers whose total duration is less than the average duration (specific number Set according to the actual situation), and ensure that after the second speech recognition server has been allocated, the total duration of the remaining speech data to be recognized can be less than the preset duration threshold after the first preset time is processed.
  • the voice recognition server By allocating part of the voice data to be recognized in the voice recognition server with a load greater than a preset value to one or more designated voice recognition servers with a small load, the service life of the voice recognition server with a large load is effectively ensured. It also further promotes the balanced use of resources of each speech recognition server.
  • the above resource allocation device based on data analysis includes:
  • the third judgment module is used to judge whether the first voice recognition server is in a normal working state
  • a second comparison module if not, compare the total duration of the voice data to be recognized by other voice recognition servers except the first voice recognition server to obtain a comparison result
  • a determining module configured to determine a fourth voice recognition server for processing the voice recognition request according to the comparison result, wherein the fourth voice recognition server is in a normal working state;
  • the second distribution module is configured to distribute the voice recognition request to the fourth voice recognition server.
  • the load balancer determines to distribute the voice recognition request to the first voice recognition server, there may be a situation where the first voice recognition server is not in a normal working state, then the first voice recognition server will Unable to respond to the voice recognition request and the subsequent recognition of the voice data corresponding to the voice recognition request, the whole process cannot work normally, the IVR system cannot receive the recognition result of the first voice recognition server, and The user cannot get the response of the IVR system in time, resulting in poor user experience. Therefore, in this embodiment, it is necessary to further determine whether the first voice recognition server is in a normal working state.
  • the first voice recognition server is excluded and the first voice
  • the actual utilization rate of the resources of the voice recognition servers other than the recognition server is analyzed to determine a fourth voice recognition server for processing the voice recognition request, wherein the total duration of the current voice data of the fourth voice recognition server to be recognized is The least among the other voice recognition servers mentioned above, and after confirming that the fourth voice recognition server is in a normal working state, distribute the voice recognition request to the fourth voice recognition server so that the fourth voice recognition server can correspond deal with.
  • the voice recognition request is processed by calling the fourth voice recognition server in a normal working state, which is beneficial to the normal operation of the recognition process, and the IVR system can receive it in time
  • the recognition result of the fourth voice recognition server, and the user can also get the response of the IVR system in time, ensuring the user's experience.
  • the above determination module includes:
  • a sorting unit configured to sort the other voice recognition servers in the order of the total duration of the voice data to be recognized from small to large;
  • a traversal unit configured to traverse the other speech recognition servers according to the order
  • the judging unit is used to judge whether the currently accessed voice recognition server is in a normal working state
  • the determining unit is configured to determine the currently accessed voice recognition server as the fourth voice recognition server for processing the voice recognition request if it is, and stop traversing.
  • the step of determining the fourth voice recognition server for processing the voice recognition request according to the above comparison result specifically includes: when the first voice recognition server is in an inoperable state, remove Analyze the total duration of each voice recognition server other than a voice recognition server, and sort the other voice recognition servers according to the order of the total duration of the voice data to be recognized from small to large, in increasing order, and traverse according to the sorting For each of the other voice recognition servers mentioned above, each time a voice recognition server is traversed, if it is determined that the voice recognition server is in a normal working state, the voice recognition server is determined as the fourth voice recognition for processing the voice recognition request The server distributes the voice recognition request to the voice recognition server for processing, and stops traversing.
  • the above resource allocation device based on data analysis includes:
  • the establishment module is configured to establish a long TCP (Transmission Control Protocol) connection with each of the voice recognition servers, so as to perform information interaction with each of the voice recognition servers through the long TCP connection.
  • TCP Transmission Control Protocol
  • TCP Transmission Control Protocol
  • Transmission Control Protocol Transmission Control Protocol
  • at least one TCP long connection can be established with each voice recognition server, where the specific number of established TCP long connections is determined according to the actual situation.
  • the transmission control protocol established above can be used directly Long connection, through the transmission control protocol, the long connection performs information interaction with the voice recognition server, thereby eliminating the cost of establishing a long transmission control protocol connection when a load balancer is required to call the voice recognition server time.
  • the specific value of the number of long transmission control protocol connections established between the load balancer and each voice recognition server may be determined according to actual needs, and may be one or more. For example, load balancing The server establishes a long transmission control protocol connection with the voice recognition server A, the load balancer establishes two long transmission control protocol connections with the voice recognition server B, and the load balancer establishes five long transmission control protocol connections with the voice recognition server C .
  • the advantage of establishing multiple transmission control protocol long connections is that when the load balancer simultaneously receives multiple voice recognition requests corresponding to multiple voice data sent by the IVR system, and determines that multiple voice recognition requests need to be from the same voice
  • multiple transmission control protocol long connections can be used to distribute multiple voice recognition requests to the voice recognition server at the same time, and if there is only one transmission control protocol long connection, only one speech recognition can be distributed. After the request, another voice recognition request is distributed until the multiple voice recognition requests are distributed, so establishing a certain number of long transmission control protocol connections can effectively improve the transmission efficiency of the voice recognition request.
  • the above resource allocation device based on data analysis includes:
  • a fourth judgment module configured to judge whether the response information for the voice recognition request fed back by the first voice recognition server is received
  • a forwarding module if yes, forwarding the response information to the IVR system
  • a second receiving module configured to receive voice data corresponding to the voice recognition request sent by the IVR system
  • the sending module is configured to send the voice data to the first voice recognition server, so that the first voice recognition server recognizes the voice data.
  • the first voice recognition server will parse the syntax of the voice recognition request, and if the parsing is successful, it will return to the load balancer The request identifies successful response information, and if the resolution fails, an error is returned to the load balancer. After receiving the response information, the load balancer will forward the response information to the IVR system. After receiving the response information, the IVR system will send the voice data corresponding to the voice recognition request to the load balancer.
  • the equalizer After receiving the voice data, the equalizer will forward it to the first voice recognition server, and then the first voice recognition server will recognize the voice data using the corresponding language model according to the grammar, obtain the recognition result, and The recognition result is returned to the load balancer, so that the load balancer returns the recognition result to the IVR system, so that the IVR system performs information interaction with the user according to the recognition result.
  • the resource allocation device selects a reasonable voice recognition server to process the received voice recognition request by comparing and analyzing the total duration of the current voice data to be recognized by each voice recognition server, which is beneficial to achieve
  • the balanced use of the resources of the voice recognition server improves the efficiency of processing voice recognition requests.
  • an embodiment of the present application further provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in FIG. 4.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer device is used to store data such as voice recognition request and duration of voice data to be recognized.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • the processes of the foregoing method embodiments are executed.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • An embodiment of the present application further provides a computer non-volatile readable storage medium on which computer readable instructions are stored.
  • the processes of the foregoing method embodiments are performed.
  • the above are only the preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by the description and drawings of this application, or directly or indirectly used in other related In the technical field, the same reason is included in the scope of patent protection of this application.

Abstract

Provided in the present application are a method and apparatus for allocating resources on the basis of data analysis, and a computer device: receiving a speech recognition request sent by an IVR system; calculating the total time length of speech data to be recognized of each speech recognition server; comparing the total time lengths, and determining the speech recognition server having the shortest total time length to be a first speech recognition server for processing the speech recognition request; and distributing the speech recognition request to the first speech recognition server. The present application improves the processing efficiency for speech recognition requests.

Description

基于数据分析的资源分配方法、装置和计算机设备Resource allocation method, device and computer equipment based on data analysis
本申请要求于2018年11月12日提交中国专利局、申请号为201811340885.4,发明名称为“基于数据分析的资源分配方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application filed on November 12, 2018 in the Chinese Patent Office with the application number 201811340885.4 and the invention titled "Data analysis-based resource allocation method, device and computer equipment" Incorporated in this application.
技术领域Technical field
本申请涉及语音识别领域,具体涉及一种基于数据分析的资源分配方法、装置和计算机设备。This application relates to the field of speech recognition, and in particular to a resource allocation method, device and computer equipment based on data analysis.
背景技术Background technique
语音识别技术,是指让机器通过识别和理解,将语音信号转换为相应的文本或命令的技术,也就是说,要让机器听懂人类的语音。Voice recognition technology refers to the technology that allows the machine to convert the voice signal into the corresponding text or command through recognition and understanding, that is, to let the machine understand human speech.
负载均衡器用于将接收到的语音识别请求分发至语音识别服务器,语音识别服务器用于对接收到的语音识别请求进行处理。现有技术中,在接收到IVR(Interactive Voice Response,互动式语音应答)系统所发出的语音识别请求后,负载均衡器会使用轮询的方式来进行对语音识别服务器的调用,即选择多个语音识别服务器中的一个来处理接收到的语音识别请求,以实现各个语音识别服务器的负载均衡。但轮询只能根据交互次数来进行分配,且每次交互的时长可能存在较大的差异,由于负载均衡器没有根据各语音识别服务器的资源的实际使用情况来选择合理的语音识别服务器处理进入的语音识别请求,容易导致各语音识别服务器的资源分配不平均,语音识别请求的处理效率不高。The load balancer is used to distribute the received voice recognition request to the voice recognition server, and the voice recognition server is used to process the received voice recognition request. In the prior art, the IVR (Interactive Voice Response (Interactive Voice Response) After the voice recognition request issued by the system, the load balancer will use the polling method to call the voice recognition server, that is, select one of multiple voice recognition servers to process the received Voice recognition request to achieve load balancing of each voice recognition server. However, polling can only be allocated based on the number of interactions, and the length of each interaction may vary greatly, because the load balancer does not select a reasonable voice recognition server to process the entry based on the actual use of the resources of each voice recognition server. Voice recognition request, it is easy to cause uneven resource allocation of each voice recognition server, and the processing efficiency of voice recognition request is not high.
因此,现有技术还存在缺陷,需要改进。Therefore, the existing technology still has defects and needs improvement.
技术问题technical problem
本申请的主要目的为提供一种基于数据分析的资源分配方法、装置和计算机设备,旨在解决现有对于语音识别服务器的资源分配不平均,语音识别请求的处理效率不高的技术问题。The main purpose of the present application is to provide a resource allocation method, device and computer equipment based on data analysis, aiming to solve the existing technical problem of uneven resource allocation to the voice recognition server and low processing efficiency of voice recognition requests.
技术解决方案Technical solution
为了实现上述申请目的,本申请提出一种基于数据分析的资源分配方法,包括:In order to achieve the above application purpose, this application proposes a resource allocation method based on data analysis, including:
接收IVR(互动式语音应答)系统发送的语音识别请求;Receive voice recognition request sent by IVR (Interactive Voice Response) system;
分别计算各语音识别服务器当前的待识别语音数据的总时长;Calculate the total duration of the current voice data to be recognized by each voice recognition server separately;
对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;Comparing each of the total durations, determining the voice recognition server with the smallest total duration of the voice data to be recognized, and determining the voice recognition server with the smallest total duration as the first voice for processing the voice recognition request Identification server
将所述语音识别请求分发至所述第一语音识别服务器。Distribute the voice recognition request to the first voice recognition server.
本申请还提供了一种基于数据分析的资源分配装置,包括:This application also provides a resource allocation device based on data analysis, including:
第一接收模块,用于接收IVR系统发送的语音识别请求;The first receiving module is used to receive the voice recognition request sent by the IVR system;
第一计算模块,用于分别计算各语音识别服务器当前的待识别语音数据的总时长;The first calculation module is used to separately calculate the total duration of the current voice data to be recognized by each voice recognition server;
第一比较模块,用于对各所述总时长进行比较,得出所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;The first comparison module is used to compare each of the total durations to obtain a voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration to be used for processing The first voice recognition server for the voice recognition request;
第一分发模块,用于将所述识别请求分发至所述第一语音识别服务器。The first distribution module is configured to distribute the recognition request to the first voice recognition server.
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述方法的步骤。The present application also provides a computer device, including a memory and a processor, where the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the foregoing method are implemented.
本申请还提供一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述方法的步骤。The present application also provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps of the above method are implemented.
有益效果Beneficial effect
本申请中提供的基于数据分析的资源分配方法、装置、计算机设备和存储介质,接收IVR系统发送的语音识别请求;分别计算各语音识别服务器当前的待识别语音数据的总时长;对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;将所述识别请求分发至所述第一语音识别服务器。本申请通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,来选择合理的语音识别服务器处理接收到的语音识别请求,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。The resource allocation method, device, computer equipment and storage medium based on data analysis provided in this application receive the voice recognition request sent by the IVR system; respectively calculate the total duration of the current voice data to be recognized by each voice recognition server; Compare the total duration, determine the voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration as the first voice recognition server for processing the voice recognition request; The recognition request is distributed to the first voice recognition server. This application selects a reasonable voice recognition server to process the received voice recognition request through comparative analysis of the current total length of voice data to be recognized by each voice recognition server, which is conducive to achieving a balanced use of the voice recognition server's resources and improving voice Identify the processing efficiency of the request.
附图说明BRIEF DESCRIPTION
图1是本申请一实施例的基于数据分析的资源分配方法的流程示意图;FIG. 1 is a schematic flowchart of a resource allocation method based on data analysis according to an embodiment of the present application;
图2是本申请另一实施例的基于数据分析的资源分配方法的流程示意图;2 is a schematic flowchart of a resource allocation method based on data analysis according to another embodiment of the present application;
图3是本申请一实施例的基于数据分析的资源分配装置的结构示意框图;3 is a schematic block diagram of a structure of a resource allocation device based on data analysis according to an embodiment of the present application;
图4是本申请一实施例的计算机设备的结构示意框图。4 is a schematic block diagram of a computer device according to an embodiment of the present application.
本发明的最佳实施方式Best Mode of the Invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
参照图1,本申请一实施例中提供了一种基于数据分析的资源分配方法,包括以下步骤:Referring to FIG. 1, an embodiment of the present application provides a resource allocation method based on data analysis, including the following steps:
S1:接收IVR(互动式语音应答)系统发送的语音识别请求;S1: Receive voice recognition request sent by IVR (Interactive Voice Response) system;
S2:分别计算各语音识别服务器当前的待识别语音数据的总时长;S2: Calculate the total duration of the current voice data to be recognized by each voice recognition server separately;
S3:对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;S3: Compare each of the total durations, determine the voice recognition server with the smallest total duration of the voice data to be recognized, and determine the voice recognition server with the smallest total duration as the first to process the voice recognition request A voice recognition server;
S4:将所述语音识别请求分发至所述第一语音识别服务器。S4: Distribute the voice recognition request to the first voice recognition server.
如上述步骤S1所述,本实施例的执行主体为基于数据分析的资源分配装置,具体可为负载均衡器。负载均衡器用于接收IVR(Interactive Voice Response,互动式语音应答)系统发送的语音识别请求,并将该语音识别请求分发至语音识别服务器,以使得语音识别服务器对该语音识别请求进行处理。其中,在接收IVR系统发送的语音识别请求之前,负载均衡器需要与IVR系统建立对接,以实现与IVR系统的信息交互。举例地,负载均衡器与IVR系统建立对接的方式可为:在负载均衡器的sdp消息中带上识别资源信息,来建立负载均衡器与IVR系统的对接,其中sdp消息为IVR系统建立会话连接时使用的消息体;或者在IVR系统内直接配置负载池,使得IVR系统能通过该负载池直接与负载均衡器建立对接。As described in step S1 above, the execution subject of this embodiment is a resource allocation device based on data analysis, which may specifically be a load balancer. The load balancer is used to receive IVR (Interactive Voice Response (interactive voice response) voice recognition request sent by the system, and distribute the voice recognition request to the voice recognition server, so that the voice recognition server processes the voice recognition request. Among them, before receiving the voice recognition request sent by the IVR system, the load balancer needs to establish a connection with the IVR system to realize information interaction with the IVR system. For example, the method for establishing the connection between the load balancer and the IVR system may be: carrying the identification resource information in the sdp message of the load balancer to establish the connection between the load balancer and the IVR system, wherein the sdp message establishes a session connection for the IVR system The message body used at the time; or directly configure the load pool in the IVR system, so that the IVR system can directly establish a connection with the load balancer through the load pool.
如上述步骤S2至S4所述,在接收到IVR系统发送的语音识别请求后,负载均衡器会对各语音识别服务器的资源实际使用率进行分析。其中,上述资源实际使用率通过各语音识别服务器的待识别语音数据的时长数据,即通过分析计算出的各所述语音识别服务器当前的待识别语音数据的总时长来体现,由于负载均衡器记录有由IVR系统发送的所有的语音识别请求的数据信息,该数据信息包括各个语音数据的时长,以及将各个语音数据对应发送的各个语音识别服务器,通过将每个语音识别服务器所需要处理的语音数据的时长数据减去已经返回到负载均衡器的已处理语音数据时长数据,得到的差值就是每个语音识别服务器当前的待处理的语音数据的总时长,通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,可以确定出待识别语音数据的总时长最少的语音识别服务器,并将该总时长最少的语音识别服务器,确定为用于处理该语音识别请求的第一语音识别服务器。现有技术中,语音识别服务器的资源使用率是通过语音数据的数量来表现的,举例地,语音识别服务器A1有2条待识别语音数据,语音识别服务器A2有5条待识别语音数据,当收到语音识别请求时,负载均衡器会将该语音识别请求分发到待识别语音数据的数量较少的语音识别服务器A1,但负载均衡器并不会分析语音识别服务器A1和A2中待识别语音数据的时长,假如语音识别服务器A1的2条待识别语音数据的总时长是5分钟,语音识别服务器A2的5条待识别语音数据的总时长是2分钟,那么语音识别服务器A1的资源实际使用率是大于语音识别服务器A2的,可见现有的对语音识别服务器的资源分配的方法并不合理,此时应该将该识别请求分发到资源实际使用率较小的语音识别服务器A2,才更有利于实现语音识别服务器的资源均衡分配。本实施例利用待识别语音数据的总时长来表征资源实际使用率,能准确地体现出当前各语音识别服务器的资源的实际使用情况,并根据当前各语音识别服务器的资源的实际使用情况,来将语音识别请求合理的分发到资源实际使用率较低的语音识别服务器,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。As described in steps S2 to S4 above, after receiving the voice recognition request sent by the IVR system, the load balancer analyzes the actual resource utilization rate of each voice recognition server. Among them, the actual resource utilization rate is reflected by the duration data of the voice data to be recognized by each voice recognition server, that is, by analyzing and calculating the total duration of the current voice data to be recognized by each voice recognition server, because the load balancer records There is data information of all voice recognition requests sent by the IVR system, the data information includes the duration of each voice data, and each voice recognition server corresponding to each voice data sent, by processing the voice that each voice recognition server needs to process The duration of the data minus the duration of the processed voice data that has been returned to the load balancer, the difference is the total duration of the current voice data to be processed by each voice recognition server. A comparative analysis of the total duration of the recognized voice data can determine the voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration as the first voice for processing the voice recognition request Identify the server. In the prior art, the resource utilization rate of the voice recognition server is expressed by the amount of voice data. For example, the voice recognition server A1 has 2 voice data to be recognized, and the voice recognition server A2 has 5 voice data to be recognized. When a voice recognition request is received, the load balancer will distribute the voice recognition request to the voice recognition server A1 with a small amount of voice data to be recognized, but the load balancer will not analyze the voice recognition to be recognized in the voice recognition servers A1 and A2 The duration of the data. If the total duration of the two pieces of voice data to be recognized by the voice recognition server A1 is 5 minutes, and the total duration of the five pieces of voice data to be recognized by the voice recognition server A2 is 2 minutes, then the resources of the voice recognition server A1 are actually used The rate is greater than the voice recognition server A2. It can be seen that the existing resource allocation method for the voice recognition server is unreasonable. At this time, the recognition request should be distributed to the voice recognition server A2 with a smaller actual resource utilization rate. It is beneficial to realize the balanced distribution of resources of the speech recognition server. This embodiment uses the total duration of the voice data to be recognized to characterize the actual resource utilization rate, which can accurately reflect the current actual use of resources of each voice recognition server, and according to the current actual use of resources of each voice recognition server, Distributing the voice recognition request reasonably to the voice recognition server with a low actual utilization rate of resources is conducive to achieving a balanced use of the resource of the voice recognition server and improving the processing efficiency of the voice recognition request.
参照图2,进一步地,本申请一实施例中,上述步骤S4之后,包括:Referring to FIG. 2, further, in an embodiment of the present application, after the above step S4, it includes:
S400:判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;S400: Determine whether there is a second voice recognition server whose total duration of the voice data to be recognized is greater than a preset duration threshold;
S401:若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。S401: If yes, add the second voice recognition server to a blacklist that prohibits the processing of new voice recognition requests.
本实施例中,预先设置的预设时长阈值,代表着语音识别服务器所能支持处理的最大的语音数据的时长数,如果该语音识别服务器在长时间内处理的语音数据的时长数都大于该预设时长阈值,即意味着该语音识别服务器长时间处于超负荷工作状态,则该语音识别服务器会受到严重的损坏甚至报废。为了保证语音识别服务器能够保持良好的使用寿命,负载均衡器需要时刻监控各个语音识别服务器的工作状态,当发现存在待识别语音数据的第一总时长大于预设时长阈值的第二语音识别服务器,则会将所述第二语音识别服务器移入暂不接收新的语音识别请求的黑名单内,即在一段时间内不会向该第二语音识别服务器分发新的语音识别请求,只有当第二语音识别服务器内的待处理的语音数据的总时长小于预设时长阈值后,才会将第二语音识别服务器从该黑名单内移除。在本实施例,当负载均衡器监控到某语音识别服务器处于超负荷工作状态时,会智能地停止向该语音识别服务器分发新的语音识别请求,来有效地对该语音识别服务器进行保护,保证了该语音识别服务器的使用寿命。In this embodiment, the preset preset duration threshold represents the maximum number of voice data durations that can be processed by the voice recognition server. If the voice recognition server processes voice data within a long period of time, the number of durations is greater than this The preset duration threshold means that the voice recognition server is in an overloaded working state for a long time, and the voice recognition server will be severely damaged or even scrapped. In order to ensure that the voice recognition server can maintain a good service life, the load balancer needs to monitor the working status of each voice recognition server at all times. When it is found that there is a second voice recognition server whose first total duration of voice data to be recognized is greater than a preset duration threshold, Will move the second voice recognition server into a blacklist that does not receive new voice recognition requests temporarily, that is, no new voice recognition request will be distributed to the second voice recognition server for a period of time, only when the second voice After the total duration of the voice data to be processed in the recognition server is less than the preset duration threshold, the second voice recognition server is removed from the blacklist. In this embodiment, when the load balancer monitors that a voice recognition server is in an overloaded working state, it will intelligently stop distributing new voice recognition requests to the voice recognition server to effectively protect the voice recognition server to ensure The service life of the voice recognition server.
进一步地,本申请一实施例中,上述步骤S401之后,包括:Further, in an embodiment of the present application, after the above step S401, it includes:
S402:根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;S402: Calculate the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server;
S403:筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;S403: Filter out the third voice recognition server whose total duration of the voice data to be recognized is less than the average duration;
S404:经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;S404: After the first preset time, determine whether the total duration of the voice data to be recognized in the second voice recognition server is greater than the preset duration threshold;
S405:若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。S405: If yes, allocate part of the voice data to be recognized in the second voice recognition server to the third voice recognition server, so that the total voice data to be recognized in the second voice recognition server after distribution The duration is less than the preset duration threshold.
如上述步骤S402至S403所述,根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长的步骤,具体为:对当前所有的语音识别服务器的待识别语音数据的总时长进行求和运算得到和值,再将该和值除以所有的语音识别服务器的数量,便能得到该平均时长,进一步地,可筛选出待识别语音数据的总时长小于所述平均时长的语音识别服务器,其中,语音识别服务器的数量由实际情况决定。As described in steps S402 to S403 above, the step of calculating the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server is specifically The total duration of the voice data to be recognized by the voice recognition server is summed to obtain the sum value, and then the sum is divided by the number of all voice recognition servers to obtain the average duration. A voice recognition server whose total duration of voice data is less than the average duration, wherein the number of voice recognition servers is determined by actual conditions.
如上述步骤S404至S405所述,预先设置的第一预设时间,表示语音识别处理器在该第一预设时间内处于超负荷工作状态,几乎不会对语音识别处理器本身造成损坏。在本实施例,在第二语音识别服务器对待识别语音数据进行处理,如果在经过第一预设时间后,第二语音识别服务器内剩余的待识别语音数据的总时长小于上述预设时长阈值,则表明第二语音识别服务器并没有长时间处于超负荷工作状态;而如果在超过该第一预设时间后,第二语音识别服务器内剩余的待识别语音数据的总时长仍然大于上述预设时长阈值,则表明第二语音识别服务器长时间处于超负荷工作状态,这样会对第二语音识别服务器本身的使用寿命造成极大的影响。为了对第二语音识别服务器进行保护,保证语音识别服务器的使用寿命,此时需要将第二语音识别处理器内的部分未识别语音数据分配到其它语音识别服务器,例如第三语音识别服务器进行处理,该第三语音识别服务器为待识别语音数据的总时长小于该平均时长的语音识别服务器,其中,上述部分待识别语音数据可为第二语音识别服务器中所有的待识别语音数据中的任意部分的待识别语音数据,需要进行分配的部分待识别语音数据的时长大于或等于指定时长,上述指定时长为经过第一预设时间后的所述第二语音识别服务器内的待识别语音数据的总时长与所述预设时长阈值的差值。另外,将第二语音识别服务器内的部分待识别语音数据分配至待识别语音数据的总时长小于平均时长的第三语音识别服务器,第三语音识别服务器的数量根据实际情况而定,具体为:对第二语音识别服务器内的语音数据的实际时长数据进行分析,假如该实际时长数据不会很大,则可将语音识别服务器内的部分待识别语音数据只分配到待识别语音数据的总时长小于平均时长的某一个指定语音识别服务器,并且保证第二语音识别服务器在经过分配后,剩下的待识别语音数据能在经过该第一预设时间的处理后的总时长小于该预设时长阈值;或者假如该实际时长数据过大,则可将第二语音识别服务器内的部分待识别语音数据分配到待识别语音数据的总时长小于所述平均时长的多个指定语音识别服务器(具体数量根据实际情况设置),并且保证第二语音识别服务器在经过分配后,剩下的待识别语音数据能在经过该第一预设时间的处理后的总时长能小于该预设时长阈值。通过将负荷量大于预设值的语音识别服务器内的部分待识别语音数据分配到负荷量较小的一个或多个指定语音识别服务器,有效地保证了负荷量大的语音识别服务器的使用寿命,也进一步促进了各语音识别服务器的资源的均衡使用。As described in steps S404 to S405 above, the preset first preset time indicates that the voice recognition processor is in an overloaded working state within the first preset time, and hardly causes damage to the voice recognition processor itself. In this embodiment, the second speech recognition server processes the speech data to be recognized, if after the first preset time passes, the total duration of the remaining speech data to be recognized in the second speech recognition server is less than the preset duration threshold, It means that the second voice recognition server has not been in overload working state for a long time; and if after the first preset time is exceeded, the total duration of the voice data to be recognized remaining in the second voice recognition server is still greater than the preset duration The threshold value indicates that the second voice recognition server is in an overloaded working state for a long time, which will greatly affect the service life of the second voice recognition server itself. In order to protect the second voice recognition server and ensure the service life of the voice recognition server, it is necessary to distribute some unrecognized voice data in the second voice recognition processor to other voice recognition servers, such as the third voice recognition server for processing , The third voice recognition server is a voice recognition server whose total duration of voice data to be recognized is less than the average duration, wherein the part of the voice data to be recognized may be any part of all the voice data to be recognized in the second voice recognition server Of the voice data to be recognized, the duration of the part of the voice data to be recognized that needs to be allocated is greater than or equal to the specified duration, which is the total of the voice data to be recognized in the second voice recognition server after the first preset time The difference between the duration and the preset duration threshold. In addition, part of the voice data to be recognized in the second voice recognition server is allocated to the third voice recognition server whose total duration of the voice data to be recognized is less than the average duration. The number of the third voice recognition server depends on the actual situation, specifically: Analyze the actual duration data of the voice data in the second voice recognition server. If the actual duration data is not very large, part of the voice data to be recognized in the voice recognition server can only be allocated to the total duration of the voice data to be recognized A designated voice recognition server that is less than the average duration, and ensures that after the second voice recognition server is allocated, the total duration of the remaining voice data to be recognized after the processing of the first preset time is less than the preset duration Threshold; or if the actual duration data is too large, part of the voice data to be recognized in the second voice recognition server may be allocated to multiple designated voice recognition servers whose total duration is less than the average duration (specific number Set according to the actual situation), and ensure that after the second speech recognition server has been allocated, the total duration of the remaining speech data to be recognized can be less than the preset duration threshold after the first preset time is processed. By allocating part of the voice data to be recognized in the voice recognition server with a load greater than a preset value to one or more designated voice recognition servers with a small load, the service life of the voice recognition server with a large load is effectively ensured. It also further promotes the balanced use of resources of each speech recognition server.
进一步地,本申请一实施例中,上述步骤S4之后,包括:Further, in an embodiment of the present application, after the above step S4, it includes:
S410:判断所述第一语音识别服务器是否处于正常工作状态;S410: Determine whether the first voice recognition server is in a normal working state;
S411:若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;S411: If not, compare the total duration of the voice data to be recognized by other voice recognition servers except the first voice recognition server to obtain a comparison result;
S412:根据所述比较结果,确定出用于处理所述识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;S412: Determine a fourth voice recognition server for processing the recognition request according to the comparison result, where the fourth voice recognition server is in a normal working state;
S413:将所述语音识别请求分发至所述第四语音识别服务器。S413: Distribute the voice recognition request to the fourth voice recognition server.
本实施例中,在负载均衡器确定了将所述语音识别请求分发至第一语音识别服务器后,可能会出现第一语音识别服务器处于无法正常工作状态的情况,那么第一语音识别服务器就会无法对该语音识别请求进行响应反馈,以及后续的对与该语音识别请求相对应的语音数据的识别工作,使得整个识别流程无法正常运作,IVR系统不能收到第一语音识别服务器的识别结果,且用户无法及时得到IVR系统的回应,造成用户使用体验差。所以在本实施例,需要进一步确定第一语音识别服务器是否正常工作状态,如果判定第一语音识别服务器处于无法正常工作的状态,则将第一语音识别服务器排除掉,并对所述第一语音识别服务器之外的其它语音识别服务器的资源实际使用率进行分析,确定出用于处理所述语音识别请求的第四语音识别服务器,其中第四语音识别服务器当前的待识别语音数据的总时长在上述其它语音识别服务器之中是最少的,并在确认第四语音识别服务器处于正常工作状态后,将所述语音识别请求分发至所述第四语音识别服务器,以便该第四语音识别服务器进行对应处理。在本实施例,当第一语音识别服务器无法正常工作时,通过调用处于正常工作状态的第四语音识别服务器来对语音识别请求进行处理,有利于识别流程的正常运作,IVR系统能及时收到第四语音识别服务器的识别结果,且用户也能及时得到IVR系统的回应,保证了用户的使用体验。In this embodiment, after the load balancer determines to distribute the voice recognition request to the first voice recognition server, there may be a situation where the first voice recognition server is not in a normal working state, then the first voice recognition server will Unable to respond to the voice recognition request and the subsequent recognition of the voice data corresponding to the voice recognition request, the entire recognition process cannot work normally, and the IVR system cannot receive the recognition result of the first voice recognition server, Moreover, the user cannot get the response of the IVR system in time, resulting in poor user experience. Therefore, in this embodiment, it is necessary to further determine whether the first voice recognition server is in a normal working state. If it is determined that the first voice recognition server is in a state where it cannot work normally, the first voice recognition server is excluded and the first voice The actual utilization rate of the resources of the voice recognition servers other than the recognition server is analyzed to determine a fourth voice recognition server for processing the voice recognition request, wherein the total duration of the current voice data of the fourth voice recognition server to be recognized is The least among the other voice recognition servers mentioned above, and after confirming that the fourth voice recognition server is in a normal working state, distribute the voice recognition request to the fourth voice recognition server so that the fourth voice recognition server can correspond deal with. In this embodiment, when the first voice recognition server cannot work normally, the voice recognition request is processed by calling the fourth voice recognition server in a normal working state, which is beneficial to the normal operation of the recognition process, and the IVR system can receive it in time The recognition result of the fourth voice recognition server, and the user can also get the response of the IVR system in time, ensuring the user's experience.
进一步地,本申请一实施例中,上述步骤S412,包括:Further, in an embodiment of the present application, the above step S412 includes:
S4120:按照待识别语音数据的总时长从小到大的顺序对所述其它语音识别服务器进行排序;S4120: Sort the other speech recognition servers in order of the total duration of the speech data to be recognized from small to large;
S4121:根据所述排序,遍历所述其它语音识别服务器;S4121: Traverse the other speech recognition servers according to the sorting;
S4122:判断当前访问的语音识别服务器是否处于正常工作状态;S4122: determine whether the currently accessed voice recognition server is in a normal working state;
S4123:若是,将所述当前访问的语音识别服务器确定为用于处理所述语音识别请求的所述第四语音识别服务器,并停止遍历。S4123: If yes, determine the currently accessed voice recognition server as the fourth voice recognition server for processing the voice recognition request, and stop traversing.
本实施例中,根据上述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器的步骤,具体包括:当第一语音识别服务器为处于无法正常工作状态,则通过对除去第一语音识别服务器之外的其它各语音识别服务器的总时长进行分析,按照待识别语音数据的总时长从小到大的顺序,即递增的方式对其它各语音识别服务器进行排序,并根据该排序遍历上述的其它语音识别服务器,在每遍历到一个语音识别服务器时,如果确定该语音识别服务器处于正常工作状态,则将该语音识别服务器确定为用于处理所述语音识别请求的上述第四语音识别服务器,并将该语音识别请求分发至该语音识别服务器进行处理,并停止遍历。进一步地,如果在遍历结束后,都没有找到处于正常工作状态的语音识别服务器,则会向IVR系统返回处理失败的信息,即当前没有正常可用的语音识别服务器对上述语音识别请求进行处理,另外还会发出维修信息,以使得维修人员对处于无法正常工作状态的语音识别服务器进行维修。In this embodiment, the step of determining the fourth voice recognition server for processing the voice recognition request according to the above comparison result specifically includes: when the first voice recognition server is in an inoperable state, remove Analyze the total duration of each voice recognition server other than a voice recognition server, and sort the other voice recognition servers according to the order of the total duration of the voice data to be recognized from small to large, in increasing order, and traverse according to the sorting For each of the other voice recognition servers mentioned above, each time a voice recognition server is traversed, if it is determined that the voice recognition server is in a normal working state, the voice recognition server is determined as the fourth voice recognition for processing the voice recognition request The server distributes the voice recognition request to the voice recognition server for processing, and stops traversing. Further, if no speech recognition server in normal working state is found after the end of the traversal, it will return the processing failure information to the IVR system, that is, there is no currently available speech recognition server to process the above speech recognition request, in addition Maintenance information will also be issued to enable maintenance personnel to perform maintenance on the speech recognition server that is in a non-functional state.
进一步地,本申请一实施例中,上述步骤S1之前,包括:Further, in an embodiment of the present application, before the above step S1, it includes:
S100:与各所述语音识别服务器建立TCP(传输控制协议)长连接,以便通过所述TCP长连接与各所述语音识别服务器之间进行信息交互。S100: Establish a long TCP (transmission control protocol) connection with each of the voice recognition servers, so as to perform information interaction with each of the voice recognition servers through the long TCP connection.
本实施例中,在负载均衡器进行初始化时,可与每个语音识别服务器建立的TCP(Transmission Control Protocol,传输控制协议)长连接,可选地,可与每一个语音识别服务器建立数量至少为1的TCP长连接,其中建立的TCP长连接的具体数量按实际情况进行确定。在该传输控制协议长连接成功建立后,当负载均衡器需要将IVR系统发送的关于某一语音数据的语音识别请求分发至某一语音识别服务器时,即可直接使用上述所建立的传输控制协议长连接,通过所述传输控制协议长连接与该语音识别服务器之间进行信息交互,从而省去了当需要负载均衡器来调用该语音识别服务器时,再去建立传输控制协议长连接所耗费的时间。另外,负载均衡器与每个语音识别服务器之间所建立的传输控制协议长连接的个数的具体取值可根据实际需要而定,可以为一个,也可以为多个,举例地,负载均衡器与语音识别服务器A建立了一个传输控制协议长连接,负载均衡器与语音识别服务器B建立了两个传输控制协议长连接,负载均衡器与语音识别服务器C建立了五个传输控制协议长连接。其中,建立多个传输控制协议长连接的好处在于:当负载均衡器同时接收到IVR系统发送的多个语音数据对应的多个语音识别请求,且确定多个语音识别请求均需要由同一个语音识别服务器进行处理时,可利用多个传输控制协议长连接分别将多个语音识别请求同时分发至该语音识别服务器,而如果只有一个传输控制协议长连接的话,则只能在分发完一个语音识别请求后再分发另一个语音识别请求,直至将该多个语音识别请求分发完毕,所以建立一定数量的传输控制协议长连接,能够有效的提高了语音识别请求的传输效率。In this embodiment, when the load balancer is initialized, TCP (Transmission Control Protocol (Transmission Control Protocol) long connection. Optionally, at least one TCP long connection can be established with each voice recognition server, where the specific number of established TCP long connections is determined according to the actual situation. After the transmission control protocol long connection is successfully established, when the load balancer needs to distribute the speech recognition request about a certain speech data sent by the IVR system to a certain speech recognition server, the transmission control protocol established above can be used directly Long connection, through the transmission control protocol, the long connection performs information interaction with the voice recognition server, thereby eliminating the cost of establishing a long transmission control protocol connection when a load balancer is required to call the voice recognition server time. In addition, the specific value of the number of long transmission control protocol connections established between the load balancer and each voice recognition server may be determined according to actual needs, and may be one or more. For example, load balancing The server establishes a long transmission control protocol connection with the voice recognition server A, the load balancer establishes two long transmission control protocol connections with the voice recognition server B, and the load balancer establishes five long transmission control protocol connections with the voice recognition server C . Among them, the advantage of establishing multiple transmission control protocol long connections is that when the load balancer simultaneously receives multiple voice recognition requests corresponding to multiple voice data sent by the IVR system, and determines that multiple voice recognition requests need to be from the same voice When the recognition server performs processing, multiple transmission control protocol long connections can be used to distribute multiple voice recognition requests to the voice recognition server at the same time, and if there is only one transmission control protocol long connection, only one speech recognition can be distributed. After the request, another voice recognition request is distributed until the multiple voice recognition requests are distributed, so establishing a certain number of long transmission control protocol connections can effectively improve the transmission efficiency of the voice recognition request.
进一步地,本申请一实施例中,上述步骤S4之后,包括:Further, in an embodiment of the present application, after the above step S4, it includes:
S420:判断是否接收到所述第一语音识别服务器反馈的对于所述语音识别请求的响应信息;S420: Determine whether the response information for the voice recognition request fed back by the first voice recognition server is received;
S421:若是,将所述响应信息转发至所述IVR系统;S421: If yes, forward the response information to the IVR system;
S422:接收由所述IVR系统发送的与所述语音识别请求对应的语音数据;S422: Receive voice data corresponding to the voice recognition request sent by the IVR system;
S423:将所述语音数据发送至所述第一语音识别服务器,以便所述第一语音识别服务器对所述语音数据进行识别。S423: Send the voice data to the first voice recognition server, so that the first voice recognition server recognizes the voice data.
本实施例中,在负载均衡器将所述语音识别请求分发到第一语音识别服务器后,第一语音识别服务器会对该语音识别请求的语法进行解析,如果解析成功则会向负载均衡器返回请求识别成功的响应信息,而如果解析失败,则会向负载均衡器返回错误。在负载均衡器接收到上述响应信息后,会将该响应信息转发至上述的IVR系统,IVR系统在接收到响应信息后会向负载均衡器发送与上述语音识别请求相对应的语音数据,在负载均衡器接收到该语音数据后便会将其转发到该第一语音识别服务器,之后第一语音识别服务器会根据语法,使用对应的语言模型对该语音数据进行识别,得到识别结果,并将该识别结果返回到负载均衡器,使得负载均衡器将该识别结果返回到IVR系统,以实现IVR系统根据该识别结果与用户进行信息交互。In this embodiment, after the load balancer distributes the voice recognition request to the first voice recognition server, the first voice recognition server will parse the syntax of the voice recognition request, and if the parsing is successful, it will return to the load balancer The request identifies successful response information, and if the resolution fails, an error is returned to the load balancer. After receiving the response information, the load balancer will forward the response information to the IVR system. After receiving the response information, the IVR system will send the voice data corresponding to the voice recognition request to the load balancer. After receiving the voice data, the equalizer will forward it to the first voice recognition server, and then the first voice recognition server will recognize the voice data using the corresponding language model according to the grammar, obtain the recognition result, and The recognition result is returned to the load balancer, so that the load balancer returns the recognition result to the IVR system, so that the IVR system performs information interaction with the user according to the recognition result.
进一步地,本申请一实施例中,在接收IVR系统发送的语音识别请求的步骤之前,IVR系统会向负载均衡器发出心跳信息,负载均衡器在接收到所述IVR系统发送的心跳信息后,会判断自身是否能够发送对于所述心跳信息的反馈信息,若否,负载均衡器会发出通过第二负载均衡器接收IVR发送的语音数据的识别请求的警报信息。本实施例中,上述负载均衡器为主用负载均衡器,并对应设置至少一个备用负载均衡器,即上述第二负载均衡器。当上述负载均衡器,即主用负载均衡器在接收所述IVR系统发送的心跳信息,并判定自身出现故障,无法发送对于所述心跳信息的反馈信息后,会自动发出警报信息,以请求快速获得对应的维修,另外,主用负载均衡器也会发出通过备用负载均衡器接收IVR系统发送的语音识别请求的警报信息,在IVR系统得知主用负载均衡器出现故障,IVR会将语音识别请求发送至备用负载均衡器,备用负载均衡器会代替主用负载均衡器工作,来接收IVR发送的语音数据的识别请求,并进行后续的处理,并对当前各语音识别服务器的资源实际使用率分析,确定出用于处理所述识别请求的第一语音识别服务器,并将所述识别请求分发至所述第一语音识别服务器。通过增加备用负载均衡器,有效地提高了负载均衡器的可用性,保证服务的连续、稳定运行。另外,备用负载均衡器也可主动检测主用负载均衡器是否发送出了对于心跳信息的反馈信息,当判定主用负载均衡器出了故障,即无法正常工作后,可直接代替主用负载均衡器工作,来提醒IVR系统将语音数据的识别请求发送至备用负载均衡器。Further, in an embodiment of the present application, before the step of receiving the voice recognition request sent by the IVR system, the IVR system sends heartbeat information to the load balancer. After receiving the heartbeat information sent by the IVR system, the load balancer It will determine whether it can send feedback information about the heartbeat information. If not, the load balancer will issue an alarm message that recognizes the voice data recognition request sent by the IVR through the second load balancer. In this embodiment, the above-mentioned load balancer is the main load balancer, and correspondingly sets at least one backup load balancer, that is, the above-mentioned second load balancer. When the above load balancer, that is, the active load balancer, receives the heartbeat information sent by the IVR system and determines that it is malfunctioning, and cannot send feedback information on the heartbeat information, it will automatically send an alarm message to request fast Obtain the corresponding maintenance. In addition, the active load balancer will also issue an alarm message to receive the voice recognition request sent by the IVR system through the backup load balancer. When the IVR system learns that the main load balancer has failed, IVR will recognize the voice The request is sent to the backup load balancer. The backup load balancer will work instead of the main load balancer to receive the voice data recognition request sent by the IVR and perform subsequent processing, and the actual resource utilization rate of each voice recognition server Analysis, determine the first voice recognition server for processing the recognition request, and distribute the recognition request to the first voice recognition server. By adding a backup load balancer, the availability of the load balancer is effectively improved, and continuous and stable operation of services is ensured. In addition, the backup load balancer can also actively detect whether the main load balancer sends feedback information on heartbeat information. When it is determined that the main load balancer has failed, that is, it cannot work normally, it can directly replace the main load balancer. The device works to remind the IVR system to send the voice data recognition request to the backup load balancer.
本申请实施例的基于数据分析的资源分配方法,通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,来选择合理的语音识别服务器处理接收到的语音识别请求,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。The resource allocation method based on data analysis in the embodiment of the present application selects a reasonable voice recognition server to process the received voice recognition request by comparing and analyzing the total duration of the current voice data to be recognized by each voice recognition server, which is beneficial to achieve The balanced use of the resources of the voice recognition server improves the efficiency of processing voice recognition requests.
参照图3,本申请一实施例中还提供了一种基于数据分析的资源分配装置,包括:Referring to FIG. 3, an embodiment of the present application further provides a resource allocation device based on data analysis, including:
第一接收模块1,用于接收IVR(互动式语音应答)系统发送的语音识别请求;The first receiving module 1 is used to receive a voice recognition request sent by an IVR (Interactive Voice Response) system;
第一计算模块2,分别计算各语音识别服务器当前的待识别语音数据的总时长;The first calculation module 2 separately calculates the total duration of the current voice data to be recognized by each voice recognition server;
第一比较模块3,用于对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;The first comparison module 3 is used to compare the total durations, determine the voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration as the The first voice recognition server for the voice recognition request;
第一分发模块4,用于将所述语音识别请求分发至所述第一语音识别服务器。The first distribution module 4 is configured to distribute the voice recognition request to the first voice recognition server.
在上述第一接收模块中,本实施例的执行主体为基于数据分析的资源分配装置,具体可为负载均衡器。负载均衡器用于接收IVR(Interactive Voice Response,互动式语音应答)系统发送的语音识别请求,并将该语音识别请求分发至语音识别服务器,以使得语音识别服务器对该语音识别请求进行处理。其中,在接收IVR系统发送的语音识别请求之前,负载均衡器需要与IVR系统建立对接,以实现与IVR系统的信息交互。举例地,负载均衡器与IVR系统建立对接的方式可为:在负载均衡器的sdp消息中带上识别资源信息,来建立负载均衡器与IVR系统的对接,其中sdp消息为IVR系统建立会话连接时使用的消息体;或者在IVR系统内直接配置负载池,使得IVR系统能通过该负载池直接与负载均衡器建立对接。In the above first receiving module, the execution subject of this embodiment is a resource allocation device based on data analysis, which may specifically be a load balancer. The load balancer is used to receive IVR (Interactive Voice Response (interactive voice response) voice recognition request sent by the system, and distribute the voice recognition request to the voice recognition server, so that the voice recognition server processes the voice recognition request. Among them, before receiving the voice recognition request sent by the IVR system, the load balancer needs to establish a connection with the IVR system to realize information interaction with the IVR system. For example, the method for establishing the connection between the load balancer and the IVR system may be: carrying the identification resource information in the sdp message of the load balancer to establish the connection between the load balancer and the IVR system, wherein the sdp message establishes a session connection for the IVR system The message body used at the time; or directly configure the load pool in the IVR system, so that the IVR system can directly establish a connection with the load balancer through the load pool.
在上述第一计算模块、第一比较模块和第一分发模块中,在接收到IVR系统发送的语音识别请求后,负载均衡器会对各语音识别服务器的资源实际使用率进行分析。其中,上述资源实际使用率通过各语音识别服务器的待识别语音数据的时长数据,即通过分析计算出的各所述语音识别服务器当前的待识别语音数据的总时长来体现,由于负载均衡器记录有由IVR系统发送的所有的语音识别请求的数据信息,该数据信息包括各个语音数据的时长,以及将各个语音数据对应发送的各个语音识别服务器,通过将每个语音识别服务器所需要处理的语音数据的时长数据减去已经返回到负载均衡器的已处理语音数据时长数据,得到的差值就是每个语音识别服务器当前的待处理的语音数据的总时长,通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,可以确定出待识别语音数据的总时长最少的语音识别服务器,并将该总时长最少的语音识别服务器,确定为用于处理该语音识别请求的第一语音识别服务器。现有技术中,语音识别服务器的资源使用率是通过语音数据的数量来表现的,举例地,语音识别服务器A1有2条待识别语音数据,语音识别服务器A2有5条待识别语音数据,当收到语音识别请求时,负载均衡器会将该语音识别请求分发到待识别语音数据的数量较少的语音识别服务器A1,但负载均衡器并不会分析语音识别服务器A1和A2中待识别语音数据的时长,假如语音识别服务器A1的2条待识别语音数据的总时长是5分钟,语音识别服务器A2的5条待识别语音数据的总时长是2分钟,那么语音识别服务器A1的资源实际使用率是大于语音识别服务器A2的,可见现有的对语音识别服务器的资源分配的方法并不合理,此时应该将该识别请求分发到资源实际使用率较小的语音识别服务器A2,才更有利于实现语音识别服务器的资源均衡分配。本实施例利用待识别语音数据的总时长来表征资源实际使用率,能准确地体现出当前各语音识别服务器的资源的实际使用情况,并根据当前各语音识别服务器的资源的实际使用情况,来将语音识别请求合理的分发到资源实际使用率较低的语音识别服务器,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。In the foregoing first calculation module, first comparison module, and first distribution module, after receiving the voice recognition request sent by the IVR system, the load balancer analyzes the actual resource utilization rate of each voice recognition server. Among them, the actual resource utilization rate is reflected by the duration data of the voice data to be recognized by each voice recognition server, that is, by analyzing and calculating the total duration of the current voice data to be recognized by each voice recognition server, because the load balancer records There is data information of all voice recognition requests sent by the IVR system, the data information includes the duration of each voice data, and each voice recognition server corresponding to each voice data sent, by processing the voice that each voice recognition server needs to process The duration of the data minus the duration of the processed voice data that has been returned to the load balancer, the difference is the total duration of the current voice data to be processed by each voice recognition server. A comparative analysis of the total duration of the recognized voice data can determine the voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration as the first voice for processing the voice recognition request Identify the server. In the prior art, the resource utilization rate of the voice recognition server is expressed by the amount of voice data. For example, the voice recognition server A1 has 2 voice data to be recognized, and the voice recognition server A2 has 5 voice data to be recognized. When a voice recognition request is received, the load balancer will distribute the voice recognition request to the voice recognition server A1 with a small amount of voice data to be recognized, but the load balancer will not analyze the voice recognition to be recognized in the voice recognition servers A1 and A2 The duration of the data. If the total duration of the two pieces of voice data to be recognized by the voice recognition server A1 is 5 minutes, and the total duration of the five pieces of voice data to be recognized by the voice recognition server A2 is 2 minutes, then the resources of the voice recognition server A1 are actually used The rate is greater than the voice recognition server A2. It can be seen that the existing resource allocation method for the voice recognition server is unreasonable. At this time, the recognition request should be distributed to the voice recognition server A2 with a smaller actual resource utilization rate. It is beneficial to realize the balanced distribution of resources of the speech recognition server. This embodiment uses the total duration of the voice data to be recognized to characterize the actual resource utilization rate, which can accurately reflect the current actual use of resources of each voice recognition server, and according to the current actual use of resources of each voice recognition server, Distributing the voice recognition request reasonably to the voice recognition server with a low actual utilization rate of resources is conducive to achieving a balanced use of the resource of the voice recognition server and improving the processing efficiency of the voice recognition request.
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:Further, in an embodiment of the present application, the above resource allocation device based on data analysis includes:
第一判断模块,用于判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;A first judgment module, configured to judge whether there is a second voice recognition server whose total duration of the voice data to be recognized is greater than a preset duration threshold;
加入模块,用于若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。The joining module is used to add the second speech recognition server to the blacklist that prohibits the processing of new speech recognition requests if it is.
本实施例中,预先设置的预设时长阈值,代表着语音识别服务器所能支持处理的最大的语音数据的时长数,如果该语音识别服务器在长时间内处理的语音数据的时长数都大于该预设时长阈值,即意味着该语音识别服务器长时间处于超负荷工作状态,则该语音识别服务器会受到严重的损坏甚至报废。为了保证语音识别服务器能够保持良好的使用寿命,负载均衡器需要时刻监控各个语音识别服务器的工作状态,当发现存在待识别语音数据的第一总时长大于预设时长阈值的第二语音识别服务器,则会将所述第二语音识别服务器移入暂不接收新的语音识别请求的黑名单内,即在一段时间内不会向该第二语音识别服务器分发新的语音识别请求,只有当第二语音识别服务器内的待处理的语音数据的总时长小于预设时长阈值后,才会将第二语音识别服务器从该黑名单内移除。在本实施例,当负载均衡器监控到某语音识别服务器处于超负荷工作状态时,会智能地停止向该语音识别服务器分发新的语音识别请求,来有效地对该语音识别服务器进行保护,保证了该语音识别服务器的使用寿命。In this embodiment, the preset preset duration threshold represents the maximum number of voice data durations that can be processed by the voice recognition server. If the voice recognition server processes voice data within a long period of time, the number of durations is greater than this The preset duration threshold means that the voice recognition server is in an overloaded working state for a long time, and the voice recognition server will be severely damaged or even scrapped. In order to ensure that the voice recognition server can maintain a good service life, the load balancer needs to monitor the working status of each voice recognition server at all times. When it is found that there is a second voice recognition server whose first total duration of voice data to be recognized is greater than a preset duration threshold, Will move the second voice recognition server into a blacklist that does not receive new voice recognition requests temporarily, that is, no new voice recognition request will be distributed to the second voice recognition server for a period of time, only when the second voice After the total duration of the voice data to be processed in the recognition server is less than the preset duration threshold, the second voice recognition server is removed from the blacklist. In this embodiment, when the load balancer monitors that a voice recognition server is in an overloaded working state, it will intelligently stop distributing new voice recognition requests to the voice recognition server to effectively protect the voice recognition server to ensure The service life of the voice recognition server.
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:Further, in an embodiment of the present application, the above resource allocation device based on data analysis includes:
第二计算模块,用于根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;A second calculation module, configured to calculate the average duration of voice data to be recognized by each of the voice recognition servers according to the total duration of voice data to be recognized by each of the voice recognition servers;
筛选模块,用于筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;A screening module, configured to screen out a third voice recognition server whose total duration of voice data to be recognized is less than the average duration;
第二判断模块,用于经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;A second judgment module, configured to judge whether the total duration of the voice data to be recognized in the second voice recognition server is greater than the preset duration threshold after the first preset time has passed;
分配模块,用于若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。The distribution module is configured to, if it is, distribute part of the voice data to be recognized in the second voice recognition server to the third voice recognition server, so that the distributed voice to be recognized in the second voice recognition server The total duration of the data is less than the preset duration threshold.
在上述第二计算模块和筛选模块中,根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长的步骤,具体为:对当前所有的语音识别服务器的待识别语音数据的总时长进行求和运算得到和值,再将该和值除以所有的语音识别服务器的数量,便能得到该平均时长,进一步地,可筛选出待识别语音数据的总时长小于所述平均时长的语音识别服务器,其中,语音识别服务器的数量由实际情况决定。In the above-mentioned second calculation module and screening module, the step of calculating the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server is specifically The total duration of the voice data to be recognized by all current voice recognition servers is summed to obtain a sum value, and then the sum is divided by the number of all voice recognition servers to obtain the average duration. A voice recognition server whose total duration of voice data to be recognized is less than the average duration, wherein the number of voice recognition servers is determined by actual conditions.
在上述第二判断模块和分配模块中,预先设置的第一预设时间,表示语音识别处理器在该第一预设时间内处于超负荷工作状态,几乎不会对语音识别处理器本身造成损坏。在本实施例,在第二语音识别服务器对待识别语音数据进行处理,如果在经过第一预设时间后,第二语音识别服务器内剩余的待识别语音数据的总时长小于上述预设时长阈值,则表明第二语音识别服务器并没有长时间处于超负荷工作状态;而如果在超过该第一预设时间后,第二语音识别服务器内剩余的待识别语音数据的总时长仍然大于上述预设时长阈值,则表明第二语音识别服务器长时间处于超负荷工作状态,这样会对第二语音识别服务器本身的使用寿命造成极大的影响。为了对第二语音识别服务器进行保护,保证语音识别服务器的使用寿命,此时需要将第二语音识别处理器内的部分未识别语音数据分配到其它语音识别服务器,例如第三语音识别服务器进行处理,该第三语音识别服务器为待识别语音数据的总时长小于该平均时长的语音识别服务器,其中,上述部分待识别语音数据可为第二语音识别服务器中所有的待识别语音数据中的任意部分的待识别语音数据,需要进行分配的部分待识别语音数据的时长大于或等于指定时长,上述指定时长为经过第一预设时间后的所述第二语音识别服务器内的待识别语音数据的总时长与所述预设时长阈值的差值。另外,将第二语音识别服务器内的部分待识别语音数据分配至待识别语音数据的总时长小于平均时长的第三语音识别服务器,第三语音识别服务器的数量根据实际情况而定,具体为:对第二语音识别服务器内的语音数据的实际时长数据进行分析,假如该实际时长数据不会很大,则可将语音识别服务器内的部分待识别语音数据只分配到待识别语音数据的总时长小于平均时长的某一个指定语音识别服务器,并且保证第二语音识别服务器在经过分配后,剩下的待识别语音数据能在经过该第一预设时间的处理后的总时长小于该预设时长阈值;或者假如该实际时长数据过大,则可将第二语音识别服务器内的部分待识别语音数据分配到待识别语音数据的总时长小于所述平均时长的多个指定语音识别服务器(具体数量根据实际情况设置),并且保证第二语音识别服务器在经过分配后,剩下的待识别语音数据能在经过该第一预设时间的处理后的总时长能小于该预设时长阈值。通过将负荷量大于预设值的语音识别服务器内的部分待识别语音数据分配到负荷量较小的一个或多个指定语音识别服务器,有效地保证了负荷量大的语音识别服务器的使用寿命,也进一步促进了各语音识别服务器的资源的均衡使用。In the above second judgment module and distribution module, the preset first preset time indicates that the voice recognition processor is in an overloaded working state within the first preset time, and almost does not cause damage to the voice recognition processor itself . In this embodiment, the second speech recognition server processes the speech data to be recognized, if after the first preset time passes, the total duration of the remaining speech data to be recognized in the second speech recognition server is less than the preset duration threshold, It means that the second voice recognition server has not been in overload working state for a long time; and if after the first preset time is exceeded, the total duration of the voice data to be recognized remaining in the second voice recognition server is still greater than the preset duration The threshold value indicates that the second voice recognition server is in an overloaded working state for a long time, which will greatly affect the service life of the second voice recognition server itself. In order to protect the second voice recognition server and ensure the service life of the voice recognition server, it is necessary to distribute some unrecognized voice data in the second voice recognition processor to other voice recognition servers, such as the third voice recognition server for processing , The third voice recognition server is a voice recognition server whose total duration of voice data to be recognized is less than the average duration, wherein the part of the voice data to be recognized may be any part of all the voice data to be recognized in the second voice recognition server Of the voice data to be recognized, the duration of the part of the voice data to be recognized that needs to be allocated is greater than or equal to the specified duration, which is the total of the voice data to be recognized in the second voice recognition server after the first preset time The difference between the duration and the preset duration threshold. In addition, part of the voice data to be recognized in the second voice recognition server is allocated to the third voice recognition server whose total duration of the voice data to be recognized is less than the average duration. The number of the third voice recognition server depends on the actual situation, specifically: Analyze the actual duration data of the voice data in the second voice recognition server. If the actual duration data is not very large, part of the voice data to be recognized in the voice recognition server can only be allocated to the total duration of the voice data to be recognized A designated voice recognition server that is less than the average duration, and ensures that after the second voice recognition server is allocated, the total duration of the remaining voice data to be recognized after the processing of the first preset time is less than the preset duration Threshold; or if the actual duration data is too large, part of the voice data to be recognized in the second voice recognition server may be allocated to multiple designated voice recognition servers whose total duration is less than the average duration (specific number Set according to the actual situation), and ensure that after the second speech recognition server has been allocated, the total duration of the remaining speech data to be recognized can be less than the preset duration threshold after the first preset time is processed. By allocating part of the voice data to be recognized in the voice recognition server with a load greater than a preset value to one or more designated voice recognition servers with a small load, the service life of the voice recognition server with a large load is effectively ensured. It also further promotes the balanced use of resources of each speech recognition server.
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:Further, in an embodiment of the present application, the above resource allocation device based on data analysis includes:
第三判断模块,用于判断所述第一语音识别服务器是否处于正常工作状态;The third judgment module is used to judge whether the first voice recognition server is in a normal working state;
第二比较模块,用于若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;A second comparison module, if not, compare the total duration of the voice data to be recognized by other voice recognition servers except the first voice recognition server to obtain a comparison result;
确定模块,用于根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;A determining module, configured to determine a fourth voice recognition server for processing the voice recognition request according to the comparison result, wherein the fourth voice recognition server is in a normal working state;
第二分发模块,用于将所述语音识别请求分发至所述第四语音识别服务器。The second distribution module is configured to distribute the voice recognition request to the fourth voice recognition server.
本实施例中,在负载均衡器确定了将所述语音识别请求分发至第一语音识别服务器后,可能会出现第一语音识别服务器处于无法正常工作状态的情况,那么第一语音识别服务器就会无法对该语音识别请求进行响应反馈,以及后续的对与该语音识别请求相对应的语音数据的识别工作,使得整个流程无法正常运作,IVR系统不能收到第一语音识别服务器的识别结果,且用户无法及时得到IVR系统的回应,造成用户使用体验差。所以在本实施例,需要进一步确定第一语音识别服务器是否正常工作状态,如果判定第一语音识别服务器处于无法正常工作的状态,则将第一语音识别服务器排除掉,并对所述第一语音识别服务器之外的其它语音识别服务器的资源实际使用率进行分析,确定出用于处理所述语音识别请求的第四语音识别服务器,其中第四语音识别服务器当前的待识别语音数据的总时长在上述其它语音识别服务器之中是最少的,并在确认第四语音识别服务器处于正常工作状态后,将所述语音识别请求分发至所述第四语音识别服务器,以便该第四语音识别服务器进行对应处理。在本实施例,当第一语音识别服务器无法正常工作时,通过调用处于正常工作状态的第四语音识别服务器来对语音识别请求进行处理,有利于识别流程的正常运作,IVR系统能及时收到第四语音识别服务器的识别结果,且用户也能及时得到IVR系统的回应,保证了用户的使用体验。In this embodiment, after the load balancer determines to distribute the voice recognition request to the first voice recognition server, there may be a situation where the first voice recognition server is not in a normal working state, then the first voice recognition server will Unable to respond to the voice recognition request and the subsequent recognition of the voice data corresponding to the voice recognition request, the whole process cannot work normally, the IVR system cannot receive the recognition result of the first voice recognition server, and The user cannot get the response of the IVR system in time, resulting in poor user experience. Therefore, in this embodiment, it is necessary to further determine whether the first voice recognition server is in a normal working state. If it is determined that the first voice recognition server is in a state where it cannot work normally, the first voice recognition server is excluded and the first voice The actual utilization rate of the resources of the voice recognition servers other than the recognition server is analyzed to determine a fourth voice recognition server for processing the voice recognition request, wherein the total duration of the current voice data of the fourth voice recognition server to be recognized is The least among the other voice recognition servers mentioned above, and after confirming that the fourth voice recognition server is in a normal working state, distribute the voice recognition request to the fourth voice recognition server so that the fourth voice recognition server can correspond deal with. In this embodiment, when the first voice recognition server cannot work normally, the voice recognition request is processed by calling the fourth voice recognition server in a normal working state, which is beneficial to the normal operation of the recognition process, and the IVR system can receive it in time The recognition result of the fourth voice recognition server, and the user can also get the response of the IVR system in time, ensuring the user's experience.
进一步地,本申请一实施例中,上述确定模块,包括:Further, in an embodiment of the present application, the above determination module includes:
排序单元,用于按照待识别语音数据的总时长从小到大的顺序对所述其它语音识别服务器进行排序;A sorting unit, configured to sort the other voice recognition servers in the order of the total duration of the voice data to be recognized from small to large;
遍历单元,用于根据所述排序,遍历所述其它语音识别服务器;A traversal unit, configured to traverse the other speech recognition servers according to the order;
判断单元,用于判断当前访问的语音识别服务器是否处于正常工作状态;The judging unit is used to judge whether the currently accessed voice recognition server is in a normal working state;
确定单元,用于若是,将所述当前访问的语音识别服务器确定为用于处理所述语音识别请求的所述第四语音识别服务器,并停止遍历。The determining unit is configured to determine the currently accessed voice recognition server as the fourth voice recognition server for processing the voice recognition request if it is, and stop traversing.
本实施例中,根据上述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器的步骤,具体包括:当第一语音识别服务器为处于无法正常工作状态,则通过对除去第一语音识别服务器之外的其它各语音识别服务器的总时长进行分析,按照待识别语音数据的总时长从小到大的顺序,即递增的方式对其它各语音识别服务器进行排序,并根据该排序遍历上述的其它语音识别服务器,在每遍历到一个语音识别服务器时,如果确定该语音识别服务器处于正常工作状态,则将该语音识别服务器确定为用于处理所述语音识别请求的上述第四语音识别服务器,并将该语音识别请求分发至该语音识别服务器进行处理,并停止遍历。进一步地,如果在遍历结束后,都没有找到处于正常工作状态的语音识别服务器,则会向IVR系统返回处理失败的信息,即当前没有正常可用的语音识别服务器对上述语音识别请求进行处理,另外还会发出维修信息,以使得维修人员对处于无法正常工作状态的语音识别服务器进行维修。In this embodiment, the step of determining the fourth voice recognition server for processing the voice recognition request according to the above comparison result specifically includes: when the first voice recognition server is in an inoperable state, remove Analyze the total duration of each voice recognition server other than a voice recognition server, and sort the other voice recognition servers according to the order of the total duration of the voice data to be recognized from small to large, in increasing order, and traverse according to the sorting For each of the other voice recognition servers mentioned above, each time a voice recognition server is traversed, if it is determined that the voice recognition server is in a normal working state, the voice recognition server is determined as the fourth voice recognition for processing the voice recognition request The server distributes the voice recognition request to the voice recognition server for processing, and stops traversing. Further, if no speech recognition server in normal working state is found after the end of the traversal, it will return the processing failure information to the IVR system, that is, there is no currently available speech recognition server to process the above speech recognition request, in addition Maintenance information will also be issued to enable maintenance personnel to perform maintenance on the speech recognition server that is in a non-functional state.
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:Further, in an embodiment of the present application, the above resource allocation device based on data analysis includes:
建立模块,用于与各所述语音识别服务器建立TCP(传输控制协议)长连接,以便通过所述TCP长连接与各所述语音识别服务器之间进行信息交互。The establishment module is configured to establish a long TCP (Transmission Control Protocol) connection with each of the voice recognition servers, so as to perform information interaction with each of the voice recognition servers through the long TCP connection.
本实施例中,在负载均衡器进行初始化时,可与每个语音识别服务器建立的TCP(Transmission Control Protocol,传输控制协议)长连接,可选地,可与每一个语音识别服务器建立数量至少为1的TCP长连接,其中建立的TCP长连接的具体数量按实际情况进行确定。在该传输控制协议长连接成功建立后,当负载均衡器需要将IVR系统发送的关于某一语音数据的语音识别请求分发至某一语音识别服务器时,即可直接使用上述所建立的传输控制协议长连接,通过所述传输控制协议长连接与该语音识别服务器之间进行信息交互,从而省去了当需要负载均衡器来调用该语音识别服务器时,再去建立传输控制协议长连接所耗费的时间。另外,负载均衡器与每个语音识别服务器之间所建立的传输控制协议长连接的个数的具体取值可根据实际需要而定,可以为一个,也可以为多个,举例地,负载均衡器与语音识别服务器A建立了一个传输控制协议长连接,负载均衡器与语音识别服务器B建立了两个传输控制协议长连接,负载均衡器与语音识别服务器C建立了五个传输控制协议长连接。其中,建立多个传输控制协议长连接的好处在于:当负载均衡器同时接收到IVR系统发送的多个语音数据对应的多个语音识别请求,且确定多个语音识别请求均需要由同一个语音识别服务器进行处理时,可利用多个传输控制协议长连接分别将多个语音识别请求同时分发至该语音识别服务器,而如果只有一个传输控制协议长连接的话,则只能在分发完一个语音识别请求后再分发另一个语音识别请求,直至将该多个语音识别请求分发完毕,所以建立一定数量的传输控制协议长连接,能够有效的提高了语音识别请求的传输效率。In this embodiment, when the load balancer is initialized, TCP (Transmission Control Protocol (Transmission Control Protocol) long connection. Optionally, at least one TCP long connection can be established with each voice recognition server, where the specific number of established TCP long connections is determined according to the actual situation. After the transmission control protocol long connection is successfully established, when the load balancer needs to distribute the speech recognition request about a certain speech data sent by the IVR system to a certain speech recognition server, the transmission control protocol established above can be used directly Long connection, through the transmission control protocol, the long connection performs information interaction with the voice recognition server, thereby eliminating the cost of establishing a long transmission control protocol connection when a load balancer is required to call the voice recognition server time. In addition, the specific value of the number of long transmission control protocol connections established between the load balancer and each voice recognition server may be determined according to actual needs, and may be one or more. For example, load balancing The server establishes a long transmission control protocol connection with the voice recognition server A, the load balancer establishes two long transmission control protocol connections with the voice recognition server B, and the load balancer establishes five long transmission control protocol connections with the voice recognition server C . Among them, the advantage of establishing multiple transmission control protocol long connections is that when the load balancer simultaneously receives multiple voice recognition requests corresponding to multiple voice data sent by the IVR system, and determines that multiple voice recognition requests need to be from the same voice When the recognition server performs processing, multiple transmission control protocol long connections can be used to distribute multiple voice recognition requests to the voice recognition server at the same time, and if there is only one transmission control protocol long connection, only one speech recognition can be distributed. After the request, another voice recognition request is distributed until the multiple voice recognition requests are distributed, so establishing a certain number of long transmission control protocol connections can effectively improve the transmission efficiency of the voice recognition request.
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:Further, in an embodiment of the present application, the above resource allocation device based on data analysis includes:
第四判断模块,用于判断是否接收到所述第一语音识别服务器反馈的对于所述语音识别请求的响应信息;A fourth judgment module, configured to judge whether the response information for the voice recognition request fed back by the first voice recognition server is received;
转发模块,用于若是,将所述响应信息转发至所述IVR系统;A forwarding module, if yes, forwarding the response information to the IVR system;
第二接收模块,用于接收由所述IVR系统发送的与所述语音识别请求对应的语音数据;A second receiving module, configured to receive voice data corresponding to the voice recognition request sent by the IVR system;
发送模块,用于将所述语音数据发送至所述第一语音识别服务器,以便所述第一语音识别服务器对所述语音数据进行识别。The sending module is configured to send the voice data to the first voice recognition server, so that the first voice recognition server recognizes the voice data.
本实施例中,在负载均衡器将所述语音识别请求分发到第一语音识别服务器后,第一语音识别服务器会对该语音识别请求的语法进行解析,如果解析成功则会向负载均衡器返回请求识别成功的响应信息,而如果解析失败,则会向负载均衡器返回错误。在负载均衡器接收到上述响应信息后,会将该响应信息转发至上述的IVR系统,IVR系统在接收到响应信息后会向负载均衡器发送与上述语音识别请求相对应的语音数据,在负载均衡器接收到该语音数据后便会将其转发到该第一语音识别服务器,之后第一语音识别服务器会根据语法,使用对应的语言模型对该语音数据进行识别,得到识别结果,并将该识别结果返回到负载均衡器,使得负载均衡器将该识别结果返回到IVR系统,以实现IVR系统根据该识别结果与用户进行信息交互。In this embodiment, after the load balancer distributes the voice recognition request to the first voice recognition server, the first voice recognition server will parse the syntax of the voice recognition request, and if the parsing is successful, it will return to the load balancer The request identifies successful response information, and if the resolution fails, an error is returned to the load balancer. After receiving the response information, the load balancer will forward the response information to the IVR system. After receiving the response information, the IVR system will send the voice data corresponding to the voice recognition request to the load balancer. After receiving the voice data, the equalizer will forward it to the first voice recognition server, and then the first voice recognition server will recognize the voice data using the corresponding language model according to the grammar, obtain the recognition result, and The recognition result is returned to the load balancer, so that the load balancer returns the recognition result to the IVR system, so that the IVR system performs information interaction with the user according to the recognition result.
本申请实施例的基于数据分析的资源分配装置,通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,来选择合理的语音识别服务器处理接收到的语音识别请求,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。The resource allocation device based on data analysis in the embodiment of the present application selects a reasonable voice recognition server to process the received voice recognition request by comparing and analyzing the total duration of the current voice data to be recognized by each voice recognition server, which is beneficial to achieve The balanced use of the resources of the voice recognition server improves the efficiency of processing voice recognition requests.
参照图4,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储语音识别请求以及待识别语音数据的时长等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令在执行时,执行如上述各方法的实施例的流程。本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。Referring to FIG. 4, an embodiment of the present application further provides a computer device. The computer device may be a server, and its internal structure may be as shown in FIG. 4. The computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer device is used to store data such as voice recognition request and duration of voice data to be recognized. The network interface of the computer device is used to communicate with external terminals through a network connection. When the computer-readable instructions are executed, the processes of the foregoing method embodiments are executed. Those skilled in the art can understand that the structure shown in FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
本申请一实施例还提供一种计算机非易失性可读存储介质,其上存储有计算机可读指令,该计算机可读指令在执行时,执行如上述各方法的实施例的流程。以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。An embodiment of the present application further provides a computer non-volatile readable storage medium on which computer readable instructions are stored. When the computer readable instructions are executed, the processes of the foregoing method embodiments are performed. The above are only the preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by the description and drawings of this application, or directly or indirectly used in other related In the technical field, the same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种基于数据分析的资源分配方法,其特征在于,包括:A resource allocation method based on data analysis is characterized by including:
    接收IVR(互动式语音应答)系统发送的语音识别请求;Receive voice recognition request sent by IVR (Interactive Voice Response) system;
    分别计算各语音识别服务器当前的待识别语音数据的总时长;Calculate the total duration of the current voice data to be recognized by each voice recognition server separately;
    对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;Comparing each of the total durations, determining the voice recognition server with the smallest total duration of the voice data to be recognized, and determining the voice recognition server with the smallest total duration as the first voice for processing the voice recognition request Identification server
    将所述语音识别请求分发至所述第一语音识别服务器。Distribute the voice recognition request to the first voice recognition server.
  2. 根据权利要求1所述的基于数据分析的资源分配方法,其特征在于,所述将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:The resource allocation method based on data analysis according to claim 1, wherein after the step of distributing the voice recognition request to the first voice recognition server, it includes:
    判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;Judging whether there is a second voice recognition server whose total duration of the voice data to be recognized is greater than a preset duration threshold;
    若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。If yes, add the second voice recognition server to the blacklist that prohibits the processing of new voice recognition requests.
  3. 根据权利要求2所述的基于数据分析的资源分配方法,其特征在于,所述将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内的步骤之后,包括:The resource allocation method based on data analysis according to claim 2, wherein the step of adding the second voice recognition server to a blacklist that prohibits the processing of new voice recognition requests includes:
    根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;Calculating the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server;
    筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;Filtering out a third voice recognition server whose total duration of voice data to be recognized is less than the average duration;
    经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;After the first preset time, determine whether the total duration of the voice data to be recognized in the second voice recognition server is greater than the preset duration threshold;
    若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。If yes, allocate part of the voice data to be recognized in the second voice recognition server to the third voice recognition server, so that the total duration of the voice data to be recognized in the second voice recognition server after distribution is less than The preset duration threshold.
  4. 根据权利要求1所述的基于数据分析的资源分配方法,其特征在于,所述将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:The resource allocation method based on data analysis according to claim 1, wherein after the step of distributing the voice recognition request to the first voice recognition server, it includes:
    判断所述第一语音识别服务器是否处于正常工作状态;Determine whether the first voice recognition server is in a normal working state;
    若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;If not, compare the current total duration of voice data to be recognized by other voice recognition servers except the first voice recognition server to obtain a comparison result;
    根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;According to the comparison result, a fourth voice recognition server for processing the voice recognition request is determined, wherein the fourth voice recognition server is in a normal working state;
    将所述语音识别请求分发至所述第四语音识别服务器。Distribute the voice recognition request to the fourth voice recognition server.
  5. 根据权利要求4所述的基于数据分析的资源分配方法,其特征在于,所述根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器的步骤,包括:The resource allocation method based on data analysis according to claim 4, wherein the step of determining a fourth voice recognition server for processing the voice recognition request according to the comparison result includes:
    按照待识别语音数据的总时长从小到大的顺序对所述其它语音识别服务器进行排序;Sort the other voice recognition servers according to the total duration of the voice data to be recognized from small to large;
    根据所述排序,遍历所述其它语音识别服务器;Traverse the other speech recognition servers according to the ranking;
    判断当前访问的语音识别服务器是否处于正常工作状态;Determine whether the currently accessed voice recognition server is in a normal working state;
    若是,将所述当前访问的语音识别服务器确定为用于处理所述语音识别请求的所述第四语音识别服务器,并停止遍历。If yes, determine the currently accessed voice recognition server as the fourth voice recognition server for processing the voice recognition request, and stop traversing.
  6. 根据权利要求1所述的基于数据分析的资源分配方法,其特征在于,所述接收IVR系统发送的语音识别请求的步骤之前,包括:The resource allocation method based on data analysis according to claim 1, wherein before the step of receiving the voice recognition request sent by the IVR system, it includes:
    与各所述语音识别服务器建立TCP(传输控制协议)长连接,以便通过所述TCP长连接与各所述语音识别服务器进行信息交互。Establishing a long TCP (transmission control protocol) connection with each of the voice recognition servers, so as to perform information interaction with each of the voice recognition servers through the long TCP connection.
  7. 一种基于数据分析的资源分配装置,其特征在于,包括:A resource allocation device based on data analysis is characterized in that it includes:
    第一接收模块,用于接收IVR系统发送的语音识别请求;The first receiving module is used to receive the voice recognition request sent by the IVR system;
    第一计算模块,用于分别计算各语音识别服务器当前的待识别语音数据的总时长;The first calculation module is used to separately calculate the total duration of the current voice data to be recognized by each voice recognition server;
    第一比较模块,用于对各所述总时长进行比较,得出所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;The first comparison module is used to compare each of the total durations to obtain a voice recognition server with the minimum total duration of the voice data to be recognized, and determine the voice recognition server with the minimum total duration to be used for processing The first voice recognition server for the voice recognition request;
    第一分发模块,用于将所述识别请求分发至所述第一语音识别服务器。The first distribution module is configured to distribute the recognition request to the first voice recognition server.
  8. 根据权利要求7所述的基于数据分析的资源分配装置,其特征在于,包括:The resource allocation device based on data analysis according to claim 7, comprising:
    第一判断模块,用于判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;A first judgment module, configured to judge whether there is a second voice recognition server whose total duration of the voice data to be recognized is greater than a preset duration threshold;
    加入模块,用于若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。The joining module is used to add the second speech recognition server to the blacklist that prohibits the processing of new speech recognition requests if it is.
  9. 根据权利要求8所述的基于数据分析的资源分配装置,其特征在于,包括:The resource allocation device based on data analysis according to claim 8, comprising:
    第二计算模块,用于根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;A second calculation module, configured to calculate the average duration of voice data to be recognized by each of the voice recognition servers according to the total duration of voice data to be recognized by each of the voice recognition servers;
    筛选模块,用于筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;A screening module, configured to screen out a third voice recognition server whose total duration of voice data to be recognized is less than the average duration;
    第二判断模块,用于经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;A second judgment module, configured to judge whether the total duration of the voice data to be recognized in the second voice recognition server is greater than the preset duration threshold after the first preset time has passed;
    分配模块,用于若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。The distribution module is configured to, if it is, distribute part of the voice data to be recognized in the second voice recognition server to the third voice recognition server, so that the distributed voice to be recognized in the second voice recognition server The total duration of the data is less than the preset duration threshold.
  10. 根据权利要求7所述的基于数据分析的资源分配装置,其特征在于,包括:The resource allocation device based on data analysis according to claim 7, comprising:
    第三判断模块,用于判断所述第一语音识别服务器是否处于正常工作状态;The third judgment module is used to judge whether the first voice recognition server is in a normal working state;
    第二比较模块,用于若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;A second comparison module, if not, compare the total duration of the voice data to be recognized by other voice recognition servers except the first voice recognition server to obtain a comparison result;
    确定模块,用于根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;A determining module, configured to determine a fourth voice recognition server for processing the voice recognition request according to the comparison result, wherein the fourth voice recognition server is in a normal working state;
    第二分发模块,用于将所述语音识别请求分发至所述第四语音识别服务器。The second distribution module is configured to distribute the voice recognition request to the fourth voice recognition server.
  11. 根据权利要求10所述的基于数据分析的资源分配装置,其特征在于,所述确定模块,包括:The resource allocation device based on data analysis according to claim 10, wherein the determination module comprises:
    排序单元,用于按照待识别语音数据的总时长从小到大的顺序对所述其它语音识别服务器进行排序;A sorting unit, configured to sort the other voice recognition servers in the order of the total duration of the voice data to be recognized from small to large;
    遍历单元,用于根据所述排序,遍历所述其它语音识别服务器;A traversal unit, configured to traverse the other speech recognition servers according to the order;
    判断单元,用于判断当前访问的语音识别服务器是否处于正常工作状态;The judging unit is used to judge whether the currently accessed voice recognition server is in a normal working state;
    确定单元,用于若是,将所述当前访问的语音识别服务器确定为用于处理所述语音识别请求的所述第四语音识别服务器,并停止遍历。The determining unit is configured to determine the currently accessed voice recognition server as the fourth voice recognition server for processing the voice recognition request if it is, and stop traversing.
  12. 根据权利要求7所述的基于数据分析的资源分配装置,其特征在于,包括:The resource allocation device based on data analysis according to claim 7, comprising:
    建立模块,用于与各所述语音识别服务器建立TCP(传输控制协议)长连接,以便通过所述TCP长连接与各所述语音识别服务器之间进行信息交互。The establishment module is configured to establish a long TCP (Transmission Control Protocol) connection with each of the voice recognition servers, so as to perform information interaction with each of the voice recognition servers through the long TCP connection.
  13. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现基于数据分析的资源分配方法,该基于数据分析的资源分配方法,包括:A computer device includes a memory and a processor, and the memory stores computer-readable instructions, wherein the processor implements the computer-readable instructions to implement a resource allocation method based on data analysis, which is based on data analysis Resource allocation methods, including:
    接收IVR(互动式语音应答)系统发送的语音识别请求;Receive voice recognition request sent by IVR (Interactive Voice Response) system;
    分别计算各语音识别服务器当前的待识别语音数据的总时长;Calculate the total duration of the current voice data to be recognized by each voice recognition server separately;
    对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;Comparing each of the total durations, determining the voice recognition server with the smallest total duration of the voice data to be recognized, and determining the voice recognition server with the smallest total duration as the first voice for processing the voice recognition request Identification server
    将所述语音识别请求分发至所述第一语音识别服务器。Distribute the voice recognition request to the first voice recognition server.
  14. 根据权利要求13所述的基于数据分析的计算机设备,其特征在于,所述将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:The computer device based on data analysis according to claim 13, wherein after the step of distributing the voice recognition request to the first voice recognition server, it includes:
    判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;Judging whether there is a second voice recognition server whose total duration of the voice data to be recognized is greater than a preset duration threshold;
    若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。If yes, add the second voice recognition server to the blacklist that prohibits the processing of new voice recognition requests.
  15. 根据权利要求14所述的基于数据分析的计算机设备,其特征在于,所述将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内的步骤之后,包括:The computer device based on data analysis according to claim 14, wherein the step of adding the second voice recognition server to a blacklist that prohibits the processing of new voice recognition requests includes:
    根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;Calculating the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server;
    筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;Filtering out a third voice recognition server whose total duration of voice data to be recognized is less than the average duration;
    经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;After the first preset time, determine whether the total duration of the voice data to be recognized in the second voice recognition server is greater than the preset duration threshold;
    若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。If yes, allocate part of the voice data to be recognized in the second voice recognition server to the third voice recognition server, so that the total duration of the voice data to be recognized in the second voice recognition server after distribution is less than The preset duration threshold.
  16. 根据权利要求13所述的基于数据分析的计算机设备,其特征在于,所述将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:The computer device based on data analysis according to claim 13, wherein after the step of distributing the voice recognition request to the first voice recognition server, it includes:
    判断所述第一语音识别服务器是否处于正常工作状态;Determine whether the first voice recognition server is in a normal working state;
    若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;If not, compare the current total duration of voice data to be recognized by other voice recognition servers except the first voice recognition server to obtain a comparison result;
    根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;According to the comparison result, a fourth voice recognition server for processing the voice recognition request is determined, wherein the fourth voice recognition server is in a normal working state;
    将所述语音识别请求分发至所述第四语音识别服务器。Distribute the voice recognition request to the fourth voice recognition server.
  17. 一种计算机非易失性可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现基于数据分析的资源分配方法,该基于数据分析的资源分配方法,包括:A computer non-volatile readable storage medium on which computer-readable instructions are stored, characterized in that, when the computer-readable instructions are executed by a processor, a resource allocation method based on data analysis is implemented. Resource allocation methods, including:
    接收IVR(互动式语音应答)系统发送的语音识别请求;Receive voice recognition request sent by IVR (Interactive Voice Response) system;
    分别计算各语音识别服务器当前的待识别语音数据的总时长;Calculate the total duration of the current voice data to be recognized by each voice recognition server separately;
    对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;Comparing each of the total durations, determining the voice recognition server with the smallest total duration of the voice data to be recognized, and determining the voice recognition server with the smallest total duration as the first voice for processing the voice recognition request Identification server
    将所述语音识别请求分发至所述第一语音识别服务器。Distribute the voice recognition request to the first voice recognition server.
  18. 根据权利要求17的计算机非易失性可读存储介质,其特征在于,所述处理器将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:The computer non-volatile readable storage medium according to claim 17, wherein after the step of the processor distributing the voice recognition request to the first voice recognition server includes:
    判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;Judging whether there is a second voice recognition server whose total duration of the voice data to be recognized is greater than a preset duration threshold;
    若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。If yes, add the second voice recognition server to the blacklist that prohibits the processing of new voice recognition requests.
  19. 根据权利要求18的计算机非易失性可读存储介质,其特征在于,所述处理器将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内的步骤之后,包括:The computer non-volatile readable storage medium according to claim 18, wherein after the processor adds the second voice recognition server to a blacklist that prohibits the processing of new voice recognition requests, it includes:
    根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;Calculating the average duration of the voice data to be recognized by each voice recognition server according to the total duration of the voice data to be recognized by each voice recognition server;
    筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;Filtering out a third voice recognition server whose total duration of voice data to be recognized is less than the average duration;
    经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;After the first preset time, determine whether the total duration of the voice data to be recognized in the second voice recognition server is greater than the preset duration threshold;
    若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。If yes, allocate part of the voice data to be recognized in the second voice recognition server to the third voice recognition server, so that the total duration of the voice data to be recognized in the second voice recognition server after distribution is less than The preset duration threshold.
  20. 根据权利要求17的计算机非易失性可读存储介质,其特征在于,所述处理器将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:The computer non-volatile readable storage medium according to claim 17, wherein after the step of the processor distributing the voice recognition request to the first voice recognition server includes:
    判断所述第一语音识别服务器是否处于正常工作状态;Determine whether the first voice recognition server is in a normal working state;
    若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;If not, compare the current total duration of voice data to be recognized by other voice recognition servers except the first voice recognition server to obtain a comparison result;
    根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;According to the comparison result, a fourth voice recognition server for processing the voice recognition request is determined, wherein the fourth voice recognition server is in a normal working state;
    将所述语音识别请求分发至所述第四语音识别服务器。Distribute the voice recognition request to the fourth voice recognition server.
PCT/CN2018/124400 2018-11-12 2018-12-27 Method and apparatus for allocating resources on basis of data analysis, and computer device WO2020098100A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811340885.4 2018-11-12
CN201811340885.4A CN109462647A (en) 2018-11-12 2018-11-12 Resource allocation methods, device and computer equipment based on data analysis

Publications (1)

Publication Number Publication Date
WO2020098100A1 true WO2020098100A1 (en) 2020-05-22

Family

ID=65610097

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/124400 WO2020098100A1 (en) 2018-11-12 2018-12-27 Method and apparatus for allocating resources on basis of data analysis, and computer device

Country Status (2)

Country Link
CN (1) CN109462647A (en)
WO (1) WO2020098100A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109819057B (en) * 2019-04-08 2020-09-11 科大讯飞股份有限公司 Load balancing method and system
CN110428840A (en) * 2019-07-19 2019-11-08 平安科技(深圳)有限公司 Implementation of load balancing, device and computer equipment in speech recognition system
CN111933132A (en) * 2020-07-13 2020-11-13 深圳市优必选科技股份有限公司 Speech recognition method, system, terminal device and computer readable storage medium
CN112466283B (en) * 2020-10-30 2023-12-01 北京仿真中心 Cooperative software voice recognition system
CN116386644B (en) * 2023-06-07 2024-03-22 百融至信(北京)科技有限公司 Route control method and device for ASR resource side

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571317A (en) * 2003-07-25 2005-01-26 华为技术有限公司 Transmission layer resource distributing method for wireless network controller
CN103971687A (en) * 2013-02-01 2014-08-06 腾讯科技(深圳)有限公司 Method and device for realizing load balance of voice recognition system
CN106101232A (en) * 2016-06-16 2016-11-09 北京思源置地科技有限公司 Load-balancing method and device
CN106847291A (en) * 2017-02-20 2017-06-13 成都启英泰伦科技有限公司 Speech recognition system and method that a kind of local and high in the clouds is combined
CN108337275A (en) * 2017-01-19 2018-07-27 百度在线网络技术(北京)有限公司 Task distribution method, device and equipment for Distributor

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182279A (en) * 2014-02-26 2014-12-03 无锡天脉聚源传媒科技有限公司 Task scheduling method, device and system
CN104581219B (en) * 2014-12-22 2018-01-23 浙江工业大学 A kind of control method of Streaming Media forwarding server
CN106325981A (en) * 2015-06-19 2017-01-11 阿里巴巴集团控股有限公司 Method and device for task scheduling
CN107707586A (en) * 2016-08-08 2018-02-16 北京京东尚科信息技术有限公司 Load-balancing method and device
US20180295044A1 (en) * 2017-04-05 2018-10-11 Linkedin Corporation Automated management of service instances

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571317A (en) * 2003-07-25 2005-01-26 华为技术有限公司 Transmission layer resource distributing method for wireless network controller
CN103971687A (en) * 2013-02-01 2014-08-06 腾讯科技(深圳)有限公司 Method and device for realizing load balance of voice recognition system
CN106101232A (en) * 2016-06-16 2016-11-09 北京思源置地科技有限公司 Load-balancing method and device
CN108337275A (en) * 2017-01-19 2018-07-27 百度在线网络技术(北京)有限公司 Task distribution method, device and equipment for Distributor
CN106847291A (en) * 2017-02-20 2017-06-13 成都启英泰伦科技有限公司 Speech recognition system and method that a kind of local and high in the clouds is combined

Also Published As

Publication number Publication date
CN109462647A (en) 2019-03-12

Similar Documents

Publication Publication Date Title
WO2020098100A1 (en) Method and apparatus for allocating resources on basis of data analysis, and computer device
US11729260B2 (en) Internet-of-things resource access system and method
CN110839084B (en) Session management method, device, equipment and medium
US10389801B2 (en) Service request processing method, related apparatus, and system
CN108989352B (en) Firewall implementation method and device, computer equipment and storage medium
CN108712464A (en) A kind of implementation method towards cluster micro services High Availabitity
US20060167883A1 (en) System and method for the optimization of database acess in data base networks
US9621599B2 (en) Communication system, communication method, and call control server
US20150263985A1 (en) Systems and methods for intelligent workload routing
CN111357257B (en) System and method for load balancing media server instances
CN109542659A (en) Using more activating methods, equipment, data center's cluster and readable storage medium storing program for executing
CN114237937A (en) Multithreading data transmission method and device
CN108243222A (en) Server network architecture method and device
CN111988234A (en) Overload protection method, device, server and storage medium
CN109151082A (en) A kind of multi-connection method for building up, device and system
CN110868323B (en) Bandwidth control method, device, equipment and medium
US8588400B2 (en) Category based organization and monitoring of customer service help sessions
CN112866394B (en) Load balancing method, device, system, computer equipment and storage medium
US20190028551A1 (en) Session monitoring method, apparatus, and system
CN110569238B (en) Data management method, system, storage medium and server based on big data
CN113391927A (en) Method, device and system for processing business event and storage medium
CN113553199A (en) Method and device for processing multi-client access by using asynchronous non-blocking mode
CN113873008A (en) Connection reconfiguration method, device, system and medium for RDMA network node
CN113590284A (en) Cloud platform distributed component interaction task batch processing method, system and equipment
CN106406246B (en) The method and device of scheduling message transmission

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: 18940003

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: 18940003

Country of ref document: EP

Kind code of ref document: A1