WO2020098100A1 - 基于数据分析的资源分配方法、装置和计算机设备 - Google Patents
基于数据分析的资源分配方法、装置和计算机设备 Download PDFInfo
- 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
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/28—Constructional details of speech recognition systems
- G10L15/30—Distributed recognition, e.g. in client-server systems, for mobile phones or network applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server 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.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Computer Hardware Design (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Telephonic Communication Services (AREA)
Abstract
本申请揭示了基于数据分析的资源分配方法、装置和计算机设备,接收IVR系统发送的语音识别请求;计算各语音识别服务器的待识别语音数据的总时长;对总时长进行比较,将总时长最少的语音识别服务器确定为处理语音识别请求的第一语音识别服务器;将语音识别请求分发至第一语音识别服务器。本申请提高了语音识别请求的处理效率。
Description
本申请要求于2018年11月12日提交中国专利局、申请号为201811340885.4,发明名称为“基于数据分析的资源分配方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及语音识别领域,具体涉及一种基于数据分析的资源分配方法、装置和计算机设备。
语音识别技术,是指让机器通过识别和理解,将语音信号转换为相应的文本或命令的技术,也就是说,要让机器听懂人类的语音。
负载均衡器用于将接收到的语音识别请求分发至语音识别服务器,语音识别服务器用于对接收到的语音识别请求进行处理。现有技术中,在接收到IVR(Interactive
Voice Response,互动式语音应答)系统所发出的语音识别请求后,负载均衡器会使用轮询的方式来进行对语音识别服务器的调用,即选择多个语音识别服务器中的一个来处理接收到的语音识别请求,以实现各个语音识别服务器的负载均衡。但轮询只能根据交互次数来进行分配,且每次交互的时长可能存在较大的差异,由于负载均衡器没有根据各语音识别服务器的资源的实际使用情况来选择合理的语音识别服务器处理进入的语音识别请求,容易导致各语音识别服务器的资源分配不平均,语音识别请求的处理效率不高。
因此,现有技术还存在缺陷,需要改进。
本申请的主要目的为提供一种基于数据分析的资源分配方法、装置和计算机设备,旨在解决现有对于语音识别服务器的资源分配不平均,语音识别请求的处理效率不高的技术问题。
为了实现上述申请目的,本申请提出一种基于数据分析的资源分配方法,包括:
接收IVR(互动式语音应答)系统发送的语音识别请求;
分别计算各语音识别服务器当前的待识别语音数据的总时长;
对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;
将所述语音识别请求分发至所述第一语音识别服务器。
本申请还提供了一种基于数据分析的资源分配装置,包括:
第一接收模块,用于接收IVR系统发送的语音识别请求;
第一计算模块,用于分别计算各语音识别服务器当前的待识别语音数据的总时长;
第一比较模块,用于对各所述总时长进行比较,得出所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;
第一分发模块,用于将所述识别请求分发至所述第一语音识别服务器。
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述方法的步骤。
本申请还提供一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述方法的步骤。
本申请中提供的基于数据分析的资源分配方法、装置、计算机设备和存储介质,接收IVR系统发送的语音识别请求;分别计算各语音识别服务器当前的待识别语音数据的总时长;对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;将所述识别请求分发至所述第一语音识别服务器。本申请通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,来选择合理的语音识别服务器处理接收到的语音识别请求,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。
图1是本申请一实施例的基于数据分析的资源分配方法的流程示意图;
图2是本申请另一实施例的基于数据分析的资源分配方法的流程示意图;
图3是本申请一实施例的基于数据分析的资源分配装置的结构示意框图;
图4是本申请一实施例的计算机设备的结构示意框图。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,本申请一实施例中提供了一种基于数据分析的资源分配方法,包括以下步骤:
S1:接收IVR(互动式语音应答)系统发送的语音识别请求;
S2:分别计算各语音识别服务器当前的待识别语音数据的总时长;
S3:对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;
S4:将所述语音识别请求分发至所述第一语音识别服务器。
如上述步骤S1所述,本实施例的执行主体为基于数据分析的资源分配装置,具体可为负载均衡器。负载均衡器用于接收IVR(Interactive
Voice Response,互动式语音应答)系统发送的语音识别请求,并将该语音识别请求分发至语音识别服务器,以使得语音识别服务器对该语音识别请求进行处理。其中,在接收IVR系统发送的语音识别请求之前,负载均衡器需要与IVR系统建立对接,以实现与IVR系统的信息交互。举例地,负载均衡器与IVR系统建立对接的方式可为:在负载均衡器的sdp消息中带上识别资源信息,来建立负载均衡器与IVR系统的对接,其中sdp消息为IVR系统建立会话连接时使用的消息体;或者在IVR系统内直接配置负载池,使得IVR系统能通过该负载池直接与负载均衡器建立对接。
如上述步骤S2至S4所述,在接收到IVR系统发送的语音识别请求后,负载均衡器会对各语音识别服务器的资源实际使用率进行分析。其中,上述资源实际使用率通过各语音识别服务器的待识别语音数据的时长数据,即通过分析计算出的各所述语音识别服务器当前的待识别语音数据的总时长来体现,由于负载均衡器记录有由IVR系统发送的所有的语音识别请求的数据信息,该数据信息包括各个语音数据的时长,以及将各个语音数据对应发送的各个语音识别服务器,通过将每个语音识别服务器所需要处理的语音数据的时长数据减去已经返回到负载均衡器的已处理语音数据时长数据,得到的差值就是每个语音识别服务器当前的待处理的语音数据的总时长,通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,可以确定出待识别语音数据的总时长最少的语音识别服务器,并将该总时长最少的语音识别服务器,确定为用于处理该语音识别请求的第一语音识别服务器。现有技术中,语音识别服务器的资源使用率是通过语音数据的数量来表现的,举例地,语音识别服务器A1有2条待识别语音数据,语音识别服务器A2有5条待识别语音数据,当收到语音识别请求时,负载均衡器会将该语音识别请求分发到待识别语音数据的数量较少的语音识别服务器A1,但负载均衡器并不会分析语音识别服务器A1和A2中待识别语音数据的时长,假如语音识别服务器A1的2条待识别语音数据的总时长是5分钟,语音识别服务器A2的5条待识别语音数据的总时长是2分钟,那么语音识别服务器A1的资源实际使用率是大于语音识别服务器A2的,可见现有的对语音识别服务器的资源分配的方法并不合理,此时应该将该识别请求分发到资源实际使用率较小的语音识别服务器A2,才更有利于实现语音识别服务器的资源均衡分配。本实施例利用待识别语音数据的总时长来表征资源实际使用率,能准确地体现出当前各语音识别服务器的资源的实际使用情况,并根据当前各语音识别服务器的资源的实际使用情况,来将语音识别请求合理的分发到资源实际使用率较低的语音识别服务器,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。
参照图2,进一步地,本申请一实施例中,上述步骤S4之后,包括:
S400:判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;
S401:若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。
本实施例中,预先设置的预设时长阈值,代表着语音识别服务器所能支持处理的最大的语音数据的时长数,如果该语音识别服务器在长时间内处理的语音数据的时长数都大于该预设时长阈值,即意味着该语音识别服务器长时间处于超负荷工作状态,则该语音识别服务器会受到严重的损坏甚至报废。为了保证语音识别服务器能够保持良好的使用寿命,负载均衡器需要时刻监控各个语音识别服务器的工作状态,当发现存在待识别语音数据的第一总时长大于预设时长阈值的第二语音识别服务器,则会将所述第二语音识别服务器移入暂不接收新的语音识别请求的黑名单内,即在一段时间内不会向该第二语音识别服务器分发新的语音识别请求,只有当第二语音识别服务器内的待处理的语音数据的总时长小于预设时长阈值后,才会将第二语音识别服务器从该黑名单内移除。在本实施例,当负载均衡器监控到某语音识别服务器处于超负荷工作状态时,会智能地停止向该语音识别服务器分发新的语音识别请求,来有效地对该语音识别服务器进行保护,保证了该语音识别服务器的使用寿命。
进一步地,本申请一实施例中,上述步骤S401之后,包括:
S402:根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;
S403:筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;
S404:经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;
S405:若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。
如上述步骤S402至S403所述,根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长的步骤,具体为:对当前所有的语音识别服务器的待识别语音数据的总时长进行求和运算得到和值,再将该和值除以所有的语音识别服务器的数量,便能得到该平均时长,进一步地,可筛选出待识别语音数据的总时长小于所述平均时长的语音识别服务器,其中,语音识别服务器的数量由实际情况决定。
如上述步骤S404至S405所述,预先设置的第一预设时间,表示语音识别处理器在该第一预设时间内处于超负荷工作状态,几乎不会对语音识别处理器本身造成损坏。在本实施例,在第二语音识别服务器对待识别语音数据进行处理,如果在经过第一预设时间后,第二语音识别服务器内剩余的待识别语音数据的总时长小于上述预设时长阈值,则表明第二语音识别服务器并没有长时间处于超负荷工作状态;而如果在超过该第一预设时间后,第二语音识别服务器内剩余的待识别语音数据的总时长仍然大于上述预设时长阈值,则表明第二语音识别服务器长时间处于超负荷工作状态,这样会对第二语音识别服务器本身的使用寿命造成极大的影响。为了对第二语音识别服务器进行保护,保证语音识别服务器的使用寿命,此时需要将第二语音识别处理器内的部分未识别语音数据分配到其它语音识别服务器,例如第三语音识别服务器进行处理,该第三语音识别服务器为待识别语音数据的总时长小于该平均时长的语音识别服务器,其中,上述部分待识别语音数据可为第二语音识别服务器中所有的待识别语音数据中的任意部分的待识别语音数据,需要进行分配的部分待识别语音数据的时长大于或等于指定时长,上述指定时长为经过第一预设时间后的所述第二语音识别服务器内的待识别语音数据的总时长与所述预设时长阈值的差值。另外,将第二语音识别服务器内的部分待识别语音数据分配至待识别语音数据的总时长小于平均时长的第三语音识别服务器,第三语音识别服务器的数量根据实际情况而定,具体为:对第二语音识别服务器内的语音数据的实际时长数据进行分析,假如该实际时长数据不会很大,则可将语音识别服务器内的部分待识别语音数据只分配到待识别语音数据的总时长小于平均时长的某一个指定语音识别服务器,并且保证第二语音识别服务器在经过分配后,剩下的待识别语音数据能在经过该第一预设时间的处理后的总时长小于该预设时长阈值;或者假如该实际时长数据过大,则可将第二语音识别服务器内的部分待识别语音数据分配到待识别语音数据的总时长小于所述平均时长的多个指定语音识别服务器(具体数量根据实际情况设置),并且保证第二语音识别服务器在经过分配后,剩下的待识别语音数据能在经过该第一预设时间的处理后的总时长能小于该预设时长阈值。通过将负荷量大于预设值的语音识别服务器内的部分待识别语音数据分配到负荷量较小的一个或多个指定语音识别服务器,有效地保证了负荷量大的语音识别服务器的使用寿命,也进一步促进了各语音识别服务器的资源的均衡使用。
进一步地,本申请一实施例中,上述步骤S4之后,包括:
S410:判断所述第一语音识别服务器是否处于正常工作状态;
S411:若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;
S412:根据所述比较结果,确定出用于处理所述识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;
S413:将所述语音识别请求分发至所述第四语音识别服务器。
本实施例中,在负载均衡器确定了将所述语音识别请求分发至第一语音识别服务器后,可能会出现第一语音识别服务器处于无法正常工作状态的情况,那么第一语音识别服务器就会无法对该语音识别请求进行响应反馈,以及后续的对与该语音识别请求相对应的语音数据的识别工作,使得整个识别流程无法正常运作,IVR系统不能收到第一语音识别服务器的识别结果,且用户无法及时得到IVR系统的回应,造成用户使用体验差。所以在本实施例,需要进一步确定第一语音识别服务器是否正常工作状态,如果判定第一语音识别服务器处于无法正常工作的状态,则将第一语音识别服务器排除掉,并对所述第一语音识别服务器之外的其它语音识别服务器的资源实际使用率进行分析,确定出用于处理所述语音识别请求的第四语音识别服务器,其中第四语音识别服务器当前的待识别语音数据的总时长在上述其它语音识别服务器之中是最少的,并在确认第四语音识别服务器处于正常工作状态后,将所述语音识别请求分发至所述第四语音识别服务器,以便该第四语音识别服务器进行对应处理。在本实施例,当第一语音识别服务器无法正常工作时,通过调用处于正常工作状态的第四语音识别服务器来对语音识别请求进行处理,有利于识别流程的正常运作,IVR系统能及时收到第四语音识别服务器的识别结果,且用户也能及时得到IVR系统的回应,保证了用户的使用体验。
进一步地,本申请一实施例中,上述步骤S412,包括:
S4120:按照待识别语音数据的总时长从小到大的顺序对所述其它语音识别服务器进行排序;
S4121:根据所述排序,遍历所述其它语音识别服务器;
S4122:判断当前访问的语音识别服务器是否处于正常工作状态;
S4123:若是,将所述当前访问的语音识别服务器确定为用于处理所述语音识别请求的所述第四语音识别服务器,并停止遍历。
本实施例中,根据上述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器的步骤,具体包括:当第一语音识别服务器为处于无法正常工作状态,则通过对除去第一语音识别服务器之外的其它各语音识别服务器的总时长进行分析,按照待识别语音数据的总时长从小到大的顺序,即递增的方式对其它各语音识别服务器进行排序,并根据该排序遍历上述的其它语音识别服务器,在每遍历到一个语音识别服务器时,如果确定该语音识别服务器处于正常工作状态,则将该语音识别服务器确定为用于处理所述语音识别请求的上述第四语音识别服务器,并将该语音识别请求分发至该语音识别服务器进行处理,并停止遍历。进一步地,如果在遍历结束后,都没有找到处于正常工作状态的语音识别服务器,则会向IVR系统返回处理失败的信息,即当前没有正常可用的语音识别服务器对上述语音识别请求进行处理,另外还会发出维修信息,以使得维修人员对处于无法正常工作状态的语音识别服务器进行维修。
进一步地,本申请一实施例中,上述步骤S1之前,包括:
S100:与各所述语音识别服务器建立TCP(传输控制协议)长连接,以便通过所述TCP长连接与各所述语音识别服务器之间进行信息交互。
本实施例中,在负载均衡器进行初始化时,可与每个语音识别服务器建立的TCP(Transmission
Control Protocol,传输控制协议)长连接,可选地,可与每一个语音识别服务器建立数量至少为1的TCP长连接,其中建立的TCP长连接的具体数量按实际情况进行确定。在该传输控制协议长连接成功建立后,当负载均衡器需要将IVR系统发送的关于某一语音数据的语音识别请求分发至某一语音识别服务器时,即可直接使用上述所建立的传输控制协议长连接,通过所述传输控制协议长连接与该语音识别服务器之间进行信息交互,从而省去了当需要负载均衡器来调用该语音识别服务器时,再去建立传输控制协议长连接所耗费的时间。另外,负载均衡器与每个语音识别服务器之间所建立的传输控制协议长连接的个数的具体取值可根据实际需要而定,可以为一个,也可以为多个,举例地,负载均衡器与语音识别服务器A建立了一个传输控制协议长连接,负载均衡器与语音识别服务器B建立了两个传输控制协议长连接,负载均衡器与语音识别服务器C建立了五个传输控制协议长连接。其中,建立多个传输控制协议长连接的好处在于:当负载均衡器同时接收到IVR系统发送的多个语音数据对应的多个语音识别请求,且确定多个语音识别请求均需要由同一个语音识别服务器进行处理时,可利用多个传输控制协议长连接分别将多个语音识别请求同时分发至该语音识别服务器,而如果只有一个传输控制协议长连接的话,则只能在分发完一个语音识别请求后再分发另一个语音识别请求,直至将该多个语音识别请求分发完毕,所以建立一定数量的传输控制协议长连接,能够有效的提高了语音识别请求的传输效率。
进一步地,本申请一实施例中,上述步骤S4之后,包括:
S420:判断是否接收到所述第一语音识别服务器反馈的对于所述语音识别请求的响应信息;
S421:若是,将所述响应信息转发至所述IVR系统;
S422:接收由所述IVR系统发送的与所述语音识别请求对应的语音数据;
S423:将所述语音数据发送至所述第一语音识别服务器,以便所述第一语音识别服务器对所述语音数据进行识别。
本实施例中,在负载均衡器将所述语音识别请求分发到第一语音识别服务器后,第一语音识别服务器会对该语音识别请求的语法进行解析,如果解析成功则会向负载均衡器返回请求识别成功的响应信息,而如果解析失败,则会向负载均衡器返回错误。在负载均衡器接收到上述响应信息后,会将该响应信息转发至上述的IVR系统,IVR系统在接收到响应信息后会向负载均衡器发送与上述语音识别请求相对应的语音数据,在负载均衡器接收到该语音数据后便会将其转发到该第一语音识别服务器,之后第一语音识别服务器会根据语法,使用对应的语言模型对该语音数据进行识别,得到识别结果,并将该识别结果返回到负载均衡器,使得负载均衡器将该识别结果返回到IVR系统,以实现IVR系统根据该识别结果与用户进行信息交互。
进一步地,本申请一实施例中,在接收IVR系统发送的语音识别请求的步骤之前,IVR系统会向负载均衡器发出心跳信息,负载均衡器在接收到所述IVR系统发送的心跳信息后,会判断自身是否能够发送对于所述心跳信息的反馈信息,若否,负载均衡器会发出通过第二负载均衡器接收IVR发送的语音数据的识别请求的警报信息。本实施例中,上述负载均衡器为主用负载均衡器,并对应设置至少一个备用负载均衡器,即上述第二负载均衡器。当上述负载均衡器,即主用负载均衡器在接收所述IVR系统发送的心跳信息,并判定自身出现故障,无法发送对于所述心跳信息的反馈信息后,会自动发出警报信息,以请求快速获得对应的维修,另外,主用负载均衡器也会发出通过备用负载均衡器接收IVR系统发送的语音识别请求的警报信息,在IVR系统得知主用负载均衡器出现故障,IVR会将语音识别请求发送至备用负载均衡器,备用负载均衡器会代替主用负载均衡器工作,来接收IVR发送的语音数据的识别请求,并进行后续的处理,并对当前各语音识别服务器的资源实际使用率分析,确定出用于处理所述识别请求的第一语音识别服务器,并将所述识别请求分发至所述第一语音识别服务器。通过增加备用负载均衡器,有效地提高了负载均衡器的可用性,保证服务的连续、稳定运行。另外,备用负载均衡器也可主动检测主用负载均衡器是否发送出了对于心跳信息的反馈信息,当判定主用负载均衡器出了故障,即无法正常工作后,可直接代替主用负载均衡器工作,来提醒IVR系统将语音数据的识别请求发送至备用负载均衡器。
本申请实施例的基于数据分析的资源分配方法,通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,来选择合理的语音识别服务器处理接收到的语音识别请求,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。
参照图3,本申请一实施例中还提供了一种基于数据分析的资源分配装置,包括:
第一接收模块1,用于接收IVR(互动式语音应答)系统发送的语音识别请求;
第一计算模块2,分别计算各语音识别服务器当前的待识别语音数据的总时长;
第一比较模块3,用于对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;
第一分发模块4,用于将所述语音识别请求分发至所述第一语音识别服务器。
在上述第一接收模块中,本实施例的执行主体为基于数据分析的资源分配装置,具体可为负载均衡器。负载均衡器用于接收IVR(Interactive
Voice Response,互动式语音应答)系统发送的语音识别请求,并将该语音识别请求分发至语音识别服务器,以使得语音识别服务器对该语音识别请求进行处理。其中,在接收IVR系统发送的语音识别请求之前,负载均衡器需要与IVR系统建立对接,以实现与IVR系统的信息交互。举例地,负载均衡器与IVR系统建立对接的方式可为:在负载均衡器的sdp消息中带上识别资源信息,来建立负载均衡器与IVR系统的对接,其中sdp消息为IVR系统建立会话连接时使用的消息体;或者在IVR系统内直接配置负载池,使得IVR系统能通过该负载池直接与负载均衡器建立对接。
在上述第一计算模块、第一比较模块和第一分发模块中,在接收到IVR系统发送的语音识别请求后,负载均衡器会对各语音识别服务器的资源实际使用率进行分析。其中,上述资源实际使用率通过各语音识别服务器的待识别语音数据的时长数据,即通过分析计算出的各所述语音识别服务器当前的待识别语音数据的总时长来体现,由于负载均衡器记录有由IVR系统发送的所有的语音识别请求的数据信息,该数据信息包括各个语音数据的时长,以及将各个语音数据对应发送的各个语音识别服务器,通过将每个语音识别服务器所需要处理的语音数据的时长数据减去已经返回到负载均衡器的已处理语音数据时长数据,得到的差值就是每个语音识别服务器当前的待处理的语音数据的总时长,通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,可以确定出待识别语音数据的总时长最少的语音识别服务器,并将该总时长最少的语音识别服务器,确定为用于处理该语音识别请求的第一语音识别服务器。现有技术中,语音识别服务器的资源使用率是通过语音数据的数量来表现的,举例地,语音识别服务器A1有2条待识别语音数据,语音识别服务器A2有5条待识别语音数据,当收到语音识别请求时,负载均衡器会将该语音识别请求分发到待识别语音数据的数量较少的语音识别服务器A1,但负载均衡器并不会分析语音识别服务器A1和A2中待识别语音数据的时长,假如语音识别服务器A1的2条待识别语音数据的总时长是5分钟,语音识别服务器A2的5条待识别语音数据的总时长是2分钟,那么语音识别服务器A1的资源实际使用率是大于语音识别服务器A2的,可见现有的对语音识别服务器的资源分配的方法并不合理,此时应该将该识别请求分发到资源实际使用率较小的语音识别服务器A2,才更有利于实现语音识别服务器的资源均衡分配。本实施例利用待识别语音数据的总时长来表征资源实际使用率,能准确地体现出当前各语音识别服务器的资源的实际使用情况,并根据当前各语音识别服务器的资源的实际使用情况,来将语音识别请求合理的分发到资源实际使用率较低的语音识别服务器,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:
第一判断模块,用于判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;
加入模块,用于若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。
本实施例中,预先设置的预设时长阈值,代表着语音识别服务器所能支持处理的最大的语音数据的时长数,如果该语音识别服务器在长时间内处理的语音数据的时长数都大于该预设时长阈值,即意味着该语音识别服务器长时间处于超负荷工作状态,则该语音识别服务器会受到严重的损坏甚至报废。为了保证语音识别服务器能够保持良好的使用寿命,负载均衡器需要时刻监控各个语音识别服务器的工作状态,当发现存在待识别语音数据的第一总时长大于预设时长阈值的第二语音识别服务器,则会将所述第二语音识别服务器移入暂不接收新的语音识别请求的黑名单内,即在一段时间内不会向该第二语音识别服务器分发新的语音识别请求,只有当第二语音识别服务器内的待处理的语音数据的总时长小于预设时长阈值后,才会将第二语音识别服务器从该黑名单内移除。在本实施例,当负载均衡器监控到某语音识别服务器处于超负荷工作状态时,会智能地停止向该语音识别服务器分发新的语音识别请求,来有效地对该语音识别服务器进行保护,保证了该语音识别服务器的使用寿命。
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:
第二计算模块,用于根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;
筛选模块,用于筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;
第二判断模块,用于经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;
分配模块,用于若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。
在上述第二计算模块和筛选模块中,根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长的步骤,具体为:对当前所有的语音识别服务器的待识别语音数据的总时长进行求和运算得到和值,再将该和值除以所有的语音识别服务器的数量,便能得到该平均时长,进一步地,可筛选出待识别语音数据的总时长小于所述平均时长的语音识别服务器,其中,语音识别服务器的数量由实际情况决定。
在上述第二判断模块和分配模块中,预先设置的第一预设时间,表示语音识别处理器在该第一预设时间内处于超负荷工作状态,几乎不会对语音识别处理器本身造成损坏。在本实施例,在第二语音识别服务器对待识别语音数据进行处理,如果在经过第一预设时间后,第二语音识别服务器内剩余的待识别语音数据的总时长小于上述预设时长阈值,则表明第二语音识别服务器并没有长时间处于超负荷工作状态;而如果在超过该第一预设时间后,第二语音识别服务器内剩余的待识别语音数据的总时长仍然大于上述预设时长阈值,则表明第二语音识别服务器长时间处于超负荷工作状态,这样会对第二语音识别服务器本身的使用寿命造成极大的影响。为了对第二语音识别服务器进行保护,保证语音识别服务器的使用寿命,此时需要将第二语音识别处理器内的部分未识别语音数据分配到其它语音识别服务器,例如第三语音识别服务器进行处理,该第三语音识别服务器为待识别语音数据的总时长小于该平均时长的语音识别服务器,其中,上述部分待识别语音数据可为第二语音识别服务器中所有的待识别语音数据中的任意部分的待识别语音数据,需要进行分配的部分待识别语音数据的时长大于或等于指定时长,上述指定时长为经过第一预设时间后的所述第二语音识别服务器内的待识别语音数据的总时长与所述预设时长阈值的差值。另外,将第二语音识别服务器内的部分待识别语音数据分配至待识别语音数据的总时长小于平均时长的第三语音识别服务器,第三语音识别服务器的数量根据实际情况而定,具体为:对第二语音识别服务器内的语音数据的实际时长数据进行分析,假如该实际时长数据不会很大,则可将语音识别服务器内的部分待识别语音数据只分配到待识别语音数据的总时长小于平均时长的某一个指定语音识别服务器,并且保证第二语音识别服务器在经过分配后,剩下的待识别语音数据能在经过该第一预设时间的处理后的总时长小于该预设时长阈值;或者假如该实际时长数据过大,则可将第二语音识别服务器内的部分待识别语音数据分配到待识别语音数据的总时长小于所述平均时长的多个指定语音识别服务器(具体数量根据实际情况设置),并且保证第二语音识别服务器在经过分配后,剩下的待识别语音数据能在经过该第一预设时间的处理后的总时长能小于该预设时长阈值。通过将负荷量大于预设值的语音识别服务器内的部分待识别语音数据分配到负荷量较小的一个或多个指定语音识别服务器,有效地保证了负荷量大的语音识别服务器的使用寿命,也进一步促进了各语音识别服务器的资源的均衡使用。
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:
第三判断模块,用于判断所述第一语音识别服务器是否处于正常工作状态;
第二比较模块,用于若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;
确定模块,用于根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;
第二分发模块,用于将所述语音识别请求分发至所述第四语音识别服务器。
本实施例中,在负载均衡器确定了将所述语音识别请求分发至第一语音识别服务器后,可能会出现第一语音识别服务器处于无法正常工作状态的情况,那么第一语音识别服务器就会无法对该语音识别请求进行响应反馈,以及后续的对与该语音识别请求相对应的语音数据的识别工作,使得整个流程无法正常运作,IVR系统不能收到第一语音识别服务器的识别结果,且用户无法及时得到IVR系统的回应,造成用户使用体验差。所以在本实施例,需要进一步确定第一语音识别服务器是否正常工作状态,如果判定第一语音识别服务器处于无法正常工作的状态,则将第一语音识别服务器排除掉,并对所述第一语音识别服务器之外的其它语音识别服务器的资源实际使用率进行分析,确定出用于处理所述语音识别请求的第四语音识别服务器,其中第四语音识别服务器当前的待识别语音数据的总时长在上述其它语音识别服务器之中是最少的,并在确认第四语音识别服务器处于正常工作状态后,将所述语音识别请求分发至所述第四语音识别服务器,以便该第四语音识别服务器进行对应处理。在本实施例,当第一语音识别服务器无法正常工作时,通过调用处于正常工作状态的第四语音识别服务器来对语音识别请求进行处理,有利于识别流程的正常运作,IVR系统能及时收到第四语音识别服务器的识别结果,且用户也能及时得到IVR系统的回应,保证了用户的使用体验。
进一步地,本申请一实施例中,上述确定模块,包括:
排序单元,用于按照待识别语音数据的总时长从小到大的顺序对所述其它语音识别服务器进行排序;
遍历单元,用于根据所述排序,遍历所述其它语音识别服务器;
判断单元,用于判断当前访问的语音识别服务器是否处于正常工作状态;
确定单元,用于若是,将所述当前访问的语音识别服务器确定为用于处理所述语音识别请求的所述第四语音识别服务器,并停止遍历。
本实施例中,根据上述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器的步骤,具体包括:当第一语音识别服务器为处于无法正常工作状态,则通过对除去第一语音识别服务器之外的其它各语音识别服务器的总时长进行分析,按照待识别语音数据的总时长从小到大的顺序,即递增的方式对其它各语音识别服务器进行排序,并根据该排序遍历上述的其它语音识别服务器,在每遍历到一个语音识别服务器时,如果确定该语音识别服务器处于正常工作状态,则将该语音识别服务器确定为用于处理所述语音识别请求的上述第四语音识别服务器,并将该语音识别请求分发至该语音识别服务器进行处理,并停止遍历。进一步地,如果在遍历结束后,都没有找到处于正常工作状态的语音识别服务器,则会向IVR系统返回处理失败的信息,即当前没有正常可用的语音识别服务器对上述语音识别请求进行处理,另外还会发出维修信息,以使得维修人员对处于无法正常工作状态的语音识别服务器进行维修。
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:
建立模块,用于与各所述语音识别服务器建立TCP(传输控制协议)长连接,以便通过所述TCP长连接与各所述语音识别服务器之间进行信息交互。
本实施例中,在负载均衡器进行初始化时,可与每个语音识别服务器建立的TCP(Transmission
Control Protocol,传输控制协议)长连接,可选地,可与每一个语音识别服务器建立数量至少为1的TCP长连接,其中建立的TCP长连接的具体数量按实际情况进行确定。在该传输控制协议长连接成功建立后,当负载均衡器需要将IVR系统发送的关于某一语音数据的语音识别请求分发至某一语音识别服务器时,即可直接使用上述所建立的传输控制协议长连接,通过所述传输控制协议长连接与该语音识别服务器之间进行信息交互,从而省去了当需要负载均衡器来调用该语音识别服务器时,再去建立传输控制协议长连接所耗费的时间。另外,负载均衡器与每个语音识别服务器之间所建立的传输控制协议长连接的个数的具体取值可根据实际需要而定,可以为一个,也可以为多个,举例地,负载均衡器与语音识别服务器A建立了一个传输控制协议长连接,负载均衡器与语音识别服务器B建立了两个传输控制协议长连接,负载均衡器与语音识别服务器C建立了五个传输控制协议长连接。其中,建立多个传输控制协议长连接的好处在于:当负载均衡器同时接收到IVR系统发送的多个语音数据对应的多个语音识别请求,且确定多个语音识别请求均需要由同一个语音识别服务器进行处理时,可利用多个传输控制协议长连接分别将多个语音识别请求同时分发至该语音识别服务器,而如果只有一个传输控制协议长连接的话,则只能在分发完一个语音识别请求后再分发另一个语音识别请求,直至将该多个语音识别请求分发完毕,所以建立一定数量的传输控制协议长连接,能够有效的提高了语音识别请求的传输效率。
进一步地,本申请一实施例中,上述基于数据分析的资源分配装置,包括:
第四判断模块,用于判断是否接收到所述第一语音识别服务器反馈的对于所述语音识别请求的响应信息;
转发模块,用于若是,将所述响应信息转发至所述IVR系统;
第二接收模块,用于接收由所述IVR系统发送的与所述语音识别请求对应的语音数据;
发送模块,用于将所述语音数据发送至所述第一语音识别服务器,以便所述第一语音识别服务器对所述语音数据进行识别。
本实施例中,在负载均衡器将所述语音识别请求分发到第一语音识别服务器后,第一语音识别服务器会对该语音识别请求的语法进行解析,如果解析成功则会向负载均衡器返回请求识别成功的响应信息,而如果解析失败,则会向负载均衡器返回错误。在负载均衡器接收到上述响应信息后,会将该响应信息转发至上述的IVR系统,IVR系统在接收到响应信息后会向负载均衡器发送与上述语音识别请求相对应的语音数据,在负载均衡器接收到该语音数据后便会将其转发到该第一语音识别服务器,之后第一语音识别服务器会根据语法,使用对应的语言模型对该语音数据进行识别,得到识别结果,并将该识别结果返回到负载均衡器,使得负载均衡器将该识别结果返回到IVR系统,以实现IVR系统根据该识别结果与用户进行信息交互。
本申请实施例的基于数据分析的资源分配装置,通过对各语音识别服务器当前的待识别语音数据的总时长进行比较分析,来选择合理的语音识别服务器处理接收到的语音识别请求,有利于实现对语音识别服务器的资源均衡使用,提高语音识别请求的处理效率。
参照图4,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储语音识别请求以及待识别语音数据的时长等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令在执行时,执行如上述各方法的实施例的流程。本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。
本申请一实施例还提供一种计算机非易失性可读存储介质,其上存储有计算机可读指令,该计算机可读指令在执行时,执行如上述各方法的实施例的流程。以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种基于数据分析的资源分配方法,其特征在于,包括:接收IVR(互动式语音应答)系统发送的语音识别请求;分别计算各语音识别服务器当前的待识别语音数据的总时长;对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;将所述语音识别请求分发至所述第一语音识别服务器。
- 根据权利要求1所述的基于数据分析的资源分配方法,其特征在于,所述将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。
- 根据权利要求2所述的基于数据分析的资源分配方法,其特征在于,所述将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内的步骤之后,包括:根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。
- 根据权利要求1所述的基于数据分析的资源分配方法,其特征在于,所述将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:判断所述第一语音识别服务器是否处于正常工作状态;若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;将所述语音识别请求分发至所述第四语音识别服务器。
- 根据权利要求4所述的基于数据分析的资源分配方法,其特征在于,所述根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器的步骤,包括:按照待识别语音数据的总时长从小到大的顺序对所述其它语音识别服务器进行排序;根据所述排序,遍历所述其它语音识别服务器;判断当前访问的语音识别服务器是否处于正常工作状态;若是,将所述当前访问的语音识别服务器确定为用于处理所述语音识别请求的所述第四语音识别服务器,并停止遍历。
- 根据权利要求1所述的基于数据分析的资源分配方法,其特征在于,所述接收IVR系统发送的语音识别请求的步骤之前,包括:与各所述语音识别服务器建立TCP(传输控制协议)长连接,以便通过所述TCP长连接与各所述语音识别服务器进行信息交互。
- 一种基于数据分析的资源分配装置,其特征在于,包括:第一接收模块,用于接收IVR系统发送的语音识别请求;第一计算模块,用于分别计算各语音识别服务器当前的待识别语音数据的总时长;第一比较模块,用于对各所述总时长进行比较,得出所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;第一分发模块,用于将所述识别请求分发至所述第一语音识别服务器。
- 根据权利要求7所述的基于数据分析的资源分配装置,其特征在于,包括:第一判断模块,用于判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;加入模块,用于若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。
- 根据权利要求8所述的基于数据分析的资源分配装置,其特征在于,包括:第二计算模块,用于根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;筛选模块,用于筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;第二判断模块,用于经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;分配模块,用于若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。
- 根据权利要求7所述的基于数据分析的资源分配装置,其特征在于,包括:第三判断模块,用于判断所述第一语音识别服务器是否处于正常工作状态;第二比较模块,用于若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;确定模块,用于根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;第二分发模块,用于将所述语音识别请求分发至所述第四语音识别服务器。
- 根据权利要求10所述的基于数据分析的资源分配装置,其特征在于,所述确定模块,包括:排序单元,用于按照待识别语音数据的总时长从小到大的顺序对所述其它语音识别服务器进行排序;遍历单元,用于根据所述排序,遍历所述其它语音识别服务器;判断单元,用于判断当前访问的语音识别服务器是否处于正常工作状态;确定单元,用于若是,将所述当前访问的语音识别服务器确定为用于处理所述语音识别请求的所述第四语音识别服务器,并停止遍历。
- 根据权利要求7所述的基于数据分析的资源分配装置,其特征在于,包括:建立模块,用于与各所述语音识别服务器建立TCP(传输控制协议)长连接,以便通过所述TCP长连接与各所述语音识别服务器之间进行信息交互。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现基于数据分析的资源分配方法,该基于数据分析的资源分配方法,包括:接收IVR(互动式语音应答)系统发送的语音识别请求;分别计算各语音识别服务器当前的待识别语音数据的总时长;对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;将所述语音识别请求分发至所述第一语音识别服务器。
- 根据权利要求13所述的基于数据分析的计算机设备,其特征在于,所述将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。
- 根据权利要求14所述的基于数据分析的计算机设备,其特征在于,所述将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内的步骤之后,包括:根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。
- 根据权利要求13所述的基于数据分析的计算机设备,其特征在于,所述将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:判断所述第一语音识别服务器是否处于正常工作状态;若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;将所述语音识别请求分发至所述第四语音识别服务器。
- 一种计算机非易失性可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现基于数据分析的资源分配方法,该基于数据分析的资源分配方法,包括:接收IVR(互动式语音应答)系统发送的语音识别请求;分别计算各语音识别服务器当前的待识别语音数据的总时长;对各所述总时长进行比较,确定所述待识别语音数据的总时长最少的语音识别服务器,并将所述总时长最少的语音识别服务器确定为用于处理所述语音识别请求的第一语音识别服务器;将所述语音识别请求分发至所述第一语音识别服务器。
- 根据权利要求17的计算机非易失性可读存储介质,其特征在于,所述处理器将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:判断是否存在所述待识别语音数据的总时长大于预设时长阈值的第二语音识别服务器;若是,将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内。
- 根据权利要求18的计算机非易失性可读存储介质,其特征在于,所述处理器将所述第二语音识别服务器加入禁止处理新的语音识别请求的黑名单内的步骤之后,包括:根据各所述语音识别服务器的待识别语音数据的总时长,计算出各所述语音识别服务器的待识别语音数据的平均时长;筛选出待识别语音数据的总时长小于所述平均时长的第三语音识别服务器;经过第一预设时间后,判断所述第二语音识别服务器内的待识别语音数据的总时长是否大于所述预设时长阈值;若是,将所述第二语音识别服务器内的部分待识别语音数据分配至所述第三语音识别服务器,以使得经过分配后的所述第二语音识别服务器内的待识别语音数据的总时长小于所述预设时长阈值。
- 根据权利要求17的计算机非易失性可读存储介质,其特征在于,所述处理器将所述语音识别请求分发至所述第一语音识别服务器的步骤之后,包括:判断所述第一语音识别服务器是否处于正常工作状态;若否,对除所述第一语音识别服务器之外的其它语音识别服务器当前的待识别语音数据的总时长进行比较,以得到比较结果;根据所述比较结果,确定出用于处理所述语音识别请求的第四语音识别服务器,其中所述第四语音识别服务器处于正常工作状态;将所述语音识别请求分发至所述第四语音识别服务器。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811340885.4A CN109462647A (zh) | 2018-11-12 | 2018-11-12 | 基于数据分析的资源分配方法、装置和计算机设备 |
| CN201811340885.4 | 2018-11-12 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020098100A1 true WO2020098100A1 (zh) | 2020-05-22 |
Family
ID=65610097
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/124400 Ceased WO2020098100A1 (zh) | 2018-11-12 | 2018-12-27 | 基于数据分析的资源分配方法、装置和计算机设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109462647A (zh) |
| WO (1) | WO2020098100A1 (zh) |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109819057B (zh) * | 2019-04-08 | 2020-09-11 | 科大讯飞股份有限公司 | 一种负载均衡方法及系统 |
| CN110428840B (zh) * | 2019-07-19 | 2024-09-24 | 平安科技(深圳)有限公司 | 语音识别系统中的负载均衡实现方法、装置以及计算机设备 |
| CN111933132A (zh) * | 2020-07-13 | 2020-11-13 | 深圳市优必选科技股份有限公司 | 语音识别方法、系统、终端设备及计算机可读存储介质 |
| CN112331198B (zh) * | 2020-10-27 | 2024-12-03 | 深圳Tcl新技术有限公司 | 语音数据传输方法、物联网设备及存储介质 |
| CN112466283B (zh) * | 2020-10-30 | 2023-12-01 | 北京仿真中心 | 一种协同软件语音识别系统 |
| CN114510340A (zh) * | 2020-11-17 | 2022-05-17 | 英业达科技有限公司 | 网络服务负载分配系统及其方法 |
| CN114387971A (zh) * | 2021-12-15 | 2022-04-22 | 江苏号百信息服务有限公司 | 一种基于实时语音信令解析的多语音识别引擎调用的方法 |
| CN114442579A (zh) * | 2022-02-07 | 2022-05-06 | 孙霖 | 一种基于物联网的数控机床远程监控系统 |
| CN116386644B (zh) * | 2023-06-07 | 2024-03-22 | 百融至信(北京)科技有限公司 | 一种asr资源方的路由控制方法及装置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1571317A (zh) * | 2003-07-25 | 2005-01-26 | 华为技术有限公司 | 无线网络控制器的传输层资源分配方法 |
| CN103971687A (zh) * | 2013-02-01 | 2014-08-06 | 腾讯科技(深圳)有限公司 | 一种语音识别系统中的负载均衡实现方法和装置 |
| CN106101232A (zh) * | 2016-06-16 | 2016-11-09 | 北京思源置地科技有限公司 | 负载均衡方法及装置 |
| CN106847291A (zh) * | 2017-02-20 | 2017-06-13 | 成都启英泰伦科技有限公司 | 一种本地和云端相结合的语音识别系统及方法 |
| CN108337275A (zh) * | 2017-01-19 | 2018-07-27 | 百度在线网络技术(北京)有限公司 | 用于分发服务器的任务分发方法、装置以及设备 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104182279A (zh) * | 2014-02-26 | 2014-12-03 | 无锡天脉聚源传媒科技有限公司 | 一种任务调度方法、装置及系统 |
| CN104581219B (zh) * | 2014-12-22 | 2018-01-23 | 浙江工业大学 | 一种流媒体转发服务器的控制方法 |
| CN106325981A (zh) * | 2015-06-19 | 2017-01-11 | 阿里巴巴集团控股有限公司 | 一种任务调度方法及装置 |
| CN107707586A (zh) * | 2016-08-08 | 2018-02-16 | 北京京东尚科信息技术有限公司 | 负载均衡方法和装置 |
| US20180295044A1 (en) * | 2017-04-05 | 2018-10-11 | Linkedin Corporation | Automated management of service instances |
-
2018
- 2018-11-12 CN CN201811340885.4A patent/CN109462647A/zh active Pending
- 2018-12-27 WO PCT/CN2018/124400 patent/WO2020098100A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1571317A (zh) * | 2003-07-25 | 2005-01-26 | 华为技术有限公司 | 无线网络控制器的传输层资源分配方法 |
| CN103971687A (zh) * | 2013-02-01 | 2014-08-06 | 腾讯科技(深圳)有限公司 | 一种语音识别系统中的负载均衡实现方法和装置 |
| CN106101232A (zh) * | 2016-06-16 | 2016-11-09 | 北京思源置地科技有限公司 | 负载均衡方法及装置 |
| CN108337275A (zh) * | 2017-01-19 | 2018-07-27 | 百度在线网络技术(北京)有限公司 | 用于分发服务器的任务分发方法、装置以及设备 |
| CN106847291A (zh) * | 2017-02-20 | 2017-06-13 | 成都启英泰伦科技有限公司 | 一种本地和云端相结合的语音识别系统及方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109462647A (zh) | 2019-03-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020098100A1 (zh) | 基于数据分析的资源分配方法、装置和计算机设备 | |
| CN110839084B (zh) | 会话管理方法、装置、设备和介质 | |
| US7676516B2 (en) | System and method for the optimization of database access in data base networks | |
| CN108124003B (zh) | 网络管理设备连接处理方法、装置及系统 | |
| CN110740103A (zh) | 业务请求处理方法、装置、计算机设备和存储介质 | |
| CN108989352B (zh) | 防火墙实现方法、装置、计算机设备及存储介质 | |
| CN114237937A (zh) | 一种多线程的数据传输方法和装置 | |
| CN109542659A (zh) | 应用多活方法、设备、数据中心集群及可读存储介质 | |
| US20150180909A1 (en) | Communication system, communication method, and call control server | |
| CN113596170A (zh) | 基于负载均衡设备的停机处理方法、装置、介质及设备 | |
| CN108989399A (zh) | 一种集群公共数据查询方法、系统、装置及可读存储介质 | |
| US10476746B2 (en) | Network management method, device, and system | |
| CN108243222A (zh) | 服务器网络架构方法及装置 | |
| CN120075747A (zh) | 一种外呼线路路由系统 | |
| CN119415246A (zh) | 大语言模型负载均衡方法、装置、电子设备、介质及产品 | |
| CN110868323A (zh) | 一种带宽控制方法、装置、设备及介质 | |
| US8588400B2 (en) | Category based organization and monitoring of customer service help sessions | |
| WO2022016969A1 (zh) | 一种数据处理方法及装置 | |
| CN114201280A (zh) | 多媒体数据的处理方法、装置、设备以及存储介质 | |
| CN105007143A (zh) | 一种实现呼叫保存和恢复的方法及系统 | |
| CN110569238B (zh) | 一种基于大数据的数据治理方法、系统、存储介质和服务端 | |
| CN113553199A (zh) | 一种使用异步非阻塞模式处理多客户端接入的方法及装置 | |
| CN116208496A (zh) | 一种分布式服务监控与自动运维处理系统 | |
| CN117762630A (zh) | 一种实时监控驱动的云资源调节方法、系统、设备及介质 | |
| CN113391927A (zh) | 一种业务事件的处理方法、装置、系统及存储介质 |
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 |