Task processing method, system and storage medium based on distributed voice gateway

By adopting the task processing method of a distributed voice gateway in the voice processing system, calculating the task load and sorting submodules, realizing the precise allocation of subtasks and dynamic adjustment of processing cycles, the problems of processing delay and resource waste in traditional voice processing systems are solved, and the efficiency and real-time nature of task processing are improved.

CN119718674BActive Publication Date: 2025-05-16HANGZHOU SYNWAY INFORMATION ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510175383.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-05-16
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

Due to a single chip architecture, traditional voice processing systems are difficult to effectively handle massive voice recognition, synthesis and conversion tasks, resulting in processing delays and waste of resources, which cannot meet real-time requirements.

Method used

The task processing method based on a distributed voice gateway is adopted, and by calculating the task load and sorting the submodules, the subtasks are accurately allocated to the appropriate submodules, and the processing cycle and task proportion are dynamically adjusted to ensure that each submodule is load balancing and resource utilization is high.

Benefits of technology

It improves the efficiency and quality of voice processing tasks, reduces the chip idleness and high load operation, enhances the real-time and reliability of the system, and can better adapt to voice processing tasks of different scales and types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718674B_ABST
    Figure CN119718674B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of voice processing, and discloses a task processing method, system and storage medium based on a distributed voice gateway. The method is as follows: the first main module obtains a first task sequence containing multiple subtasks according to a set processing cycle, reads the processing speed and load to be calculated of the multiple connected submodules, calculates the task load, and sorts the submodules from large to small according to the task load to obtain a first module sequence. The first task sequence is matched with the first module sequence, and the subtasks and submodules are matched in order, and the tasks are distributed after matching. Then the average value of the submodule processing speed and the discrete coefficient of the load to be calculated are calculated, and the cycle adjustment value is weighted and calculated. If it exceeds the preset adjustment reference range, the processing cycle is adjusted according to its positive correlation. The above scheme is used to achieve reasonable task allocation, flexible rhythm adjustment, and improved task processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of voice processing, and in particular to a task processing method, system and storage medium based on a distributed voice gateway. Background Art

[0002] In today's era of rapid digital development, voice processing-related applications have become widely popular. Scenarios such as intelligent voice customer service, voice navigation, and real-time voice communication have put forward strict requirements on the efficient execution of voice processing tasks.

[0003] Traditional voice processing systems often rely on a single chip architecture, and face severe challenges as business expands. On the one hand, the number of voice processing tasks is growing explosively, and a large number of subtasks such as voice recognition, synthesis, and conversion are piling up. The processing capacity of a single chip quickly reaches its limit, making it difficult to complete large-scale task sequences within the specified time. Processing delays frequently occur, and real-time requirements cannot be met.

[0004] On the other hand, even if we simply adopt the strategy of increasing chip parallel processing, it is difficult to effectively solve the problem. Due to the complexity and diversity of speech processing task types, the computational complexity of different subtasks varies significantly. For example, speech recognition tasks in complex scenarios may involve the fine processing of multi-language, multi-dialect, and speech with complex background noise, which requires a lot of computation; while simple speech prompt synthesis tasks require relatively little computation. This results in an uneven task load on each chip during parallel processing, uneven chip utilization, some chips operating at high load for a long time, and some chips often idle, resulting in a waste of resources. The overall task processing efficiency still cannot be substantially improved, and an innovative distributed voice gateway task processing solution is urgently needed to break the deadlock. Summary of the invention

[0005] In order to improve the processing efficiency of work tasks in a voice gateway, the present application provides a task processing method, system and storage medium based on a distributed voice gateway.

[0006] In the first aspect, the present application provides a task processing method based on a distributed voice gateway, which adopts the following technical solution:

[0007] A task processing method based on a distributed voice gateway comprises the following steps:

[0008] The first main module acquires a first task sequence according to a set processing cycle, wherein the first task sequence includes a plurality of subtasks;

[0009] The first main module reads the processing speed and the load to be calculated of the multiple connected submodules;

[0010] Calculate the task load according to the processing speed of each submodule and the load to be calculated, wherein the task load=the load to be calculated / the processing speed;

[0011] Sort the plurality of submodules from large to small according to the task load to obtain a first module sequence;

[0012] Matching the first task sequence with the first module sequence, and matching the subtasks and the submodules according to the order of the sequences;

[0013] After the match is successful, the first main module distributes the subtask to the matched submodule for processing;

[0014] Calculating the average value of the processing speed of all the submodules to obtain a speed average value; calculating the dispersion coefficient of the load to be calculated of the submodule;

[0015] A period adjustment value is obtained by weighted calculation based on the speed average value and the discrete coefficient; if the period adjustment value exceeds a preset adjustment reference range, the processing period is adjusted in a positive correlation with the period adjustment value; the larger the period adjustment value, the longer the processing period; the smaller the period adjustment value, the shorter the processing period.

[0016] By adopting the above technical solution, by calculating the task load and sorting the submodules, the subtasks can be more accurately allocated to the appropriate submodules according to the actual processing capacity and load of each submodule, avoiding the problem of uneven task distribution in traditional parallel processing, making the workload of each submodule more balanced, improving the overall resource utilization, giving full play to the performance of each submodule, reducing the phenomenon of some chips being idle while some chips are running at high load, thereby improving the efficiency and quality of task processing. The cycle adjustment value is calculated based on the weighted average speed and the discrete coefficient, and the processing cycle is positively adjusted based on the value, so that the processing cycle can be more flexibly adapted to the actual situation of the task. When the task load changes greatly, the discrete coefficient is large or the processing speed is slow, the processing cycle is appropriately extended to avoid processing delays or errors in the submodule due to excessive tasks; when the task load is relatively stable and the submodule processing speed is fast, the processing cycle is shortened, which can further improve the real-time performance of task processing and better meet the stringent requirements of speech processing applications for real-time performance. This dynamic adjustment mechanism enables the system to maintain good performance and stability when facing speech processing tasks of different sizes and types, reduces system crashes or processing failures caused by sudden increases in task volume or complex task types, improves the reliability and robustness of the system, and provides a strong guarantee for the stable operation of speech processing related applications.

[0017] Optionally, the step of matching the subtasks and the submodules in sequence order further includes the following steps:

[0018] The subtasks include analog signal tasks, data encoding tasks and protocol flow tasks;

[0019] Calculate the processing rate of each submodule processing the analog signal task as the acquisition rate, calculate the processing rate of each submodule processing the data encoding task as the encoding rate, and calculate the processing rate of each submodule transceiving and processing the protocol stream task as the transceiving rate;

[0020] The submodule with the highest encoding rate is defined as an encoding submodule, the submodule with the highest transceiver rate among the undefined submodules is defined as a transceiver submodule, and the submodule with the highest acquisition rate among the remaining submodules is defined as an acquisition submodule;

[0021] Based on the preset task ratio, the data encoding task in the first task sequence is distributed to the encoding submodule in priority, the protocol flow task in the first task sequence is distributed to the transceiver submodule in priority, and the analog signal task in the first task sequence is distributed to the acquisition submodule in priority.

[0022] By adopting the above technical solution, the processing rate of each sub-module, such as acquisition rate, encoding rate and transceiver rate, is calculated for different types of sub-tasks (analog signal tasks, data encoding tasks and protocol flow tasks), and then the sub-modules specifically responsible are defined according to these rates, namely, encoding sub-module, transceiver sub-module and acquisition sub-module. In this way, tasks of a specific type can be preferentially assigned to the sub-module with the highest processing rate of the task, giving full play to the advantages of each sub-module, allowing the sub-task to be processed on the most suitable sub-module, greatly improving the processing speed of each sub-task, and thus improving the processing efficiency of the entire task sequence. Task distribution based on the preset task ratio makes task allocation more scientific and reasonable. Data encoding tasks are preferentially distributed to the encoding sub-module with the highest encoding rate, protocol flow tasks are distributed to the transceiver sub-module with the highest transceiver rate, and analog signal tasks are distributed to the acquisition sub-module with the highest acquisition rate, which avoids waste and unreasonable use of resources, realizes the optimal configuration of resources of each sub-module, improves the overall resource utilization of the system, and makes the system more efficient and stable when processing complex and diverse voice tasks.

[0023] Optionally, the step of matching the subtasks and the submodules in sequence order further includes the following sub-steps:

[0024] Calculating an average value of the acquisition rate, the encoding rate, and the transceiver rate as a comprehensive rate;

[0025] A task adjustment coefficient is obtained by performing weighted calculation according to the comprehensive rate and the period adjustment value;

[0026] The task proportion is adjusted according to the positive correlation of the task adjustment coefficient. The larger the task adjustment coefficient is, the higher the task proportion is; the smaller the task adjustment coefficient is, the lower the task proportion is.

[0027] By adopting the above technical solution, the comprehensive rate is obtained by calculating the average value of the acquisition rate, the encoding rate and the transceiver rate, and the task adjustment coefficient is calculated by weighting in combination with the period adjustment value, and the task proportion is adjusted according to the coefficient. This enables the task proportion to change dynamically according to the comprehensive processing capability of the submodule and the overall processing cycle of the system. When the comprehensive rate of the submodule is high and the period adjustment value is appropriate, the task adjustment coefficient increases, and the proportion of the corresponding task increases, which allows the submodule to undertake more tasks suitable for its own capabilities and give full play to its performance advantages; conversely, when the comprehensive rate is low or the period adjustment value is not ideal, the task proportion is adjusted accordingly to ensure that the task allocation matches the actual capacity of the submodule. This way of dynamically adjusting the task proportion enhances the system's ability to adapt to different workloads and task types. In the case of constantly changing voice processing tasks, the system can automatically optimize the task allocation strategy to avoid overloading or underloading some submodules due to fixed task proportions, thereby improving the overall stability and reliability of the system. At the same time, it can better adapt to complex and changeable voice processing scenarios, meet the requirements of different applications for efficient execution of voice processing tasks, further improve the overall performance and resource utilization of the system, and provide a better and more stable operating environment for voice processing related applications.

[0028] Optionally, the step of preferentially distributing the data encoding task in the first task sequence to the encoding submodule based on a preset task ratio further includes the following steps:

[0029] Acquiring the working status data of the submodule, and calculating the load from the working status data;

[0030] The task proportion of the submodule is adjusted according to the inverse correlation of the load. The larger the load, the smaller the task proportion; and the smaller the load, the larger the task proportion.

[0031] By adopting the above technical solution, the workload of each submodule can be perceived in real time and accurately by obtaining the working status data of the submodule and calculating the load, and adjusting the task proportion according to the anti-correlation of the load. When the load of a submodule is large, its task proportion is reduced to avoid excessive task accumulation and processing delay; when the load of the submodule is small, its task proportion is increased to make full use of its idle processing capacity. In this way, tasks can be dynamically and reasonably allocated to each submodule to ensure the load balance of the entire system and improve the stability and reliability of the system. This method of dynamically adjusting the task proportion according to the actual load avoids the waste of resources caused by some submodules running at high load for a long time due to too many tasks, while some submodules are idle. It allows each submodule to efficiently process tasks within its own capabilities, maximize the performance of each submodule, improve the utilization rate of the overall system resources, and reduce operating costs. The scale and complexity of speech processing tasks may change at any time. This solution enables the system to flexibly adjust task allocation according to the real-time load of the submodule, enhancing the system's adaptability to different work scenarios and task requirements. Whether facing a sudden increase in task volume or complex changes in task types, the system can respond quickly, optimize task allocation, ensure efficient execution of voice processing tasks, and improve user experience.

[0032] Optionally, the step of preferentially distributing the data encoding task in the first task sequence to the encoding submodule based on a preset task ratio further includes the following steps:

[0033] Acquire historical working status data of the submodule, and calculate a historical error rate from the historical working status data;

[0034] The task proportion of the submodule is adjusted according to the historical error rate. The larger the historical error rate is, the smaller the task proportion of the submodule is; and the smaller the historical error rate is, the larger the task proportion of the submodule is.

[0035] By adopting the above technical solution, by considering the historical error rate of the submodule to adjust the task ratio, it is possible to avoid assigning too many tasks to error-prone submodules. For speech processing tasks, the accuracy of tasks such as data encoding is crucial. By reducing the task ratio of submodules with high historical error rates, the probability of errors in the overall task processing process can be reduced, thereby improving the quality of task processing and ensuring the accuracy and integrity of speech processing. This dynamic adjustment mechanism based on the historical error rate makes task allocation more intelligent. In the past, task allocation may only be based on factors such as the processing speed of the submodule, but now the dimension of historical error rate is added to comprehensively evaluate the performance of the submodule. For example, if there are two submodules with similar processing speeds, but one of them has a higher historical error rate, more tasks can be assigned to the submodule with a lower historical error rate through this solution, optimizing the task allocation strategy so that tasks can be processed on more reliable submodules. The stability and reliability of the system are very critical for speech processing applications. When the system can automatically identify and reduce the assignment of tasks to error-prone submodules, system failures or performance degradation caused by errors can be reduced. For example, in a voice navigation system, if the data encoding submodule frequently makes errors, the navigation voice may not be played normally or an error prompt may appear. By adjusting the task ratio according to the historical error rate, the system can operate more stably and reliably, improving users' trust in the speech processing system.

[0036] Optionally, the step of matching the subtasks and the submodules in sequence order further includes the following steps:

[0037] Based on the acquired first task amount, the encoding submodule sends a change request to the first main module to change the acquisition submodule to the encoding submodule;

[0038] Based on the acquired second task amount, the encoding submodule sends a second change request to the first main module to change the transceiver submodule to the encoding submodule.

[0039] By adopting the above technical solution, in the speech processing task, the task volume is not fixed. When the first task volume or the second task volume obtained by the encoding submodule changes, the acquisition submodule or the transceiver submodule can be changed to the encoding submodule by sending a change request to the first main module. This mechanism enables the system to flexibly adjust the functions of each submodule according to the actual task requirements, effectively cope with tasks of different scales and types, avoid the situation where some module tasks are piled up while other modules are idle due to the fixed submodule division of labor, and significantly improve the system's adaptability to task changes. By changing other submodules to encoding submodules, more resources can be concentrated on encoding tasks under specific task volume requirements. Because different speech processing tasks have different requirements for resources at different stages, through this dynamic change, system resources can be more reasonably allocated and utilized, and the efficiency of resource utilization can be improved, thereby improving the task processing efficiency of the entire system. Through a flexible submodule change strategy, the system can maintain efficient operation in various task situations. Adjust the functions of sub-modules in a timely manner according to the actual task volume to ensure that each task can be processed on the most appropriate module, reduce the waiting time and error rate of task processing, thereby improving the overall performance of the system and providing users with smoother and more stable voice processing services.

[0040] Optionally, the first main module is configured with multiple network interfaces, one of which is in a separate network segment and is used to communicate with the sub-module to achieve data forwarding and sending of heartbeat packets.

[0041] By adopting the above technical solution, the master and slave modules are guaranteed to have separate network environments, thereby improving the quality and efficiency of communication.

[0042] Optionally, the step of matching the subtasks and the submodules in sequence order further includes the following steps:

[0043] Based on the acquired third task amount, the encoding submodule sends a third change request to the second main module to change the acquisition submodule or the transceiver submodule of the second main module to the encoding submodule;

[0044] Based on the acquired fourth task amount, the encoding submodule sends its own task amount to the encoding submodule controlled by the second main module.

[0045] By adopting the above technical solution, based on the third task amount, the coding submodule can send a third change request to the second main module, and change the acquisition submodule or the transceiver submodule of the second main module to the coding submodule. This breaks the resource limitation between modules and realizes the flexible allocation of submodule resources under different main modules. When the coding task amount under a certain main module increases dramatically, the temporarily idle submodule resources under other main modules can be used to convert it into a coding submodule to meet the task requirements, improve the resource utilization of the overall system, and avoid resource waste. Based on the fourth task amount, the coding submodule sends its own task amount to the coding submodule controlled by the second main module. This method realizes the dynamic allocation of tasks between coding submodules under different main modules. If the coding submodule under a certain main module has too heavy tasks, and the coding submodules under other main modules have idle processing capabilities, this task transfer mechanism can be used to make the tasks more evenly distributed among different coding submodules, prevent a single coding submodule from processing delays or errors due to task overload, and improve the task processing efficiency and stability of the entire system.

[0046] In the second aspect, the present application provides a task processing system based on a distributed voice gateway, which adopts the following technical solution:

[0047] A task processing system based on a distributed voice gateway comprises a processor, wherein the processor executes the steps of any one of the above-mentioned task processing methods based on a distributed voice gateway.

[0048] In a third aspect, the present application provides a storage medium, which adopts the following technical solution:

[0049] A storage medium stores a program, and when the program is executed by a processor, the steps of any one of the above-mentioned task processing methods based on a distributed voice gateway are implemented.

[0050] In summary, the present application includes at least one of the following beneficial technical effects:

[0051] By analyzing multi-dimensional information such as task load, processing rate of different tasks in each submodule (acquisition rate, encoding rate, receiving and sending rate), etc., we can achieve accurate matching between tasks and submodules. Based on the preset task ratio, we can give priority to assigning specific types of tasks to the submodule with the strongest ability to handle the task, effectively improving the processing speed of each subtask and thus improving the overall task processing efficiency.

[0052] Obtain submodule working status data in real time to calculate the load, and adjust the task ratio accordingly to ensure load balance among submodules. Avoid situations where some submodules are running at high load while others are idle, improve system resource utilization, reduce processing delays, and ensure stable system operation.

[0053] According to the average processing speed of the submodules and the discrete coefficient of the load to be calculated, the cycle adjustment value is weighted and the processing cycle is adjusted in a positive correlation. This enables the system to automatically adjust the processing rhythm according to the actual situation of the task, better adapt to tasks of different scales and types, and improve system stability and real-time performance.

[0054] Consider the historical error rate of the sub-module to adjust the task ratio, reduce the number of tasks assigned to error-prone sub-modules, reduce the overall task processing error rate, improve the task processing quality, and enhance the reliability and stability of the system.

[0055] Based on different task amounts, the encoding submodule can send a change request to the main module to change other submodules to the encoding submodule, thus realizing the dynamic conversion of submodule functions. This flexible resource allocation mechanism can optimize resource allocation and improve the overall performance of the system when tasks change.

[0056] The coding submodule can send a change request to the second main module to allocate submodule resources under other main modules; it can also send its own task volume to the coding submodule controlled by the second main module. This cross-module collaboration mechanism realizes the dynamic allocation and balanced processing of tasks, enhances the system's ability to cope with complex tasks, and improves the system's scalability and adaptability. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a step diagram of the task processing method based on the distributed voice gateway in the embodiment of the present application.

[0058] Figure 2 It is a step diagram for adjusting the processing cycle according to the cycle adjustment value in the steps of matching subtasks and submodules in sequence order.

[0059] Figure 3 It is a step diagram for adjusting the task proportion according to the positive correlation of the task adjustment coefficient in the steps of matching subtasks and submodules in sequence order. DETAILED DESCRIPTION

[0060] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings.

[0061] In the description of this specification, the description with reference to the terms "certain embodiments", "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0062] The present application embodiment discloses a task processing method based on a distributed voice gateway, referring to Figure 1 , including the following steps:

[0063] The first main module obtains the first task sequence according to the set processing cycle, and the first task sequence includes multiple subtasks. The first task sequence is not a simple collection of single tasks, but includes multiple subtasks with different characteristics, requirements and complexity. These subtasks cover various operations required to be completed in many aspects of speech processing, such as different stage tasks of speech recognition and subdivided process tasks of speech synthesis.

[0064] The first main module establishes a communication link with the multiple submodules it is connected to, and reads the key performance parameters of these submodules, namely the processing speed and the load to be calculated. The processing speed directly reflects the ability of each submodule to process tasks in a unit of time, which depends on many factors such as the hardware configuration of the submodule and the degree of algorithm optimization; while the load to be calculated clearly shows the amount of tasks that have not been completed and are waiting to be processed by each submodule. This data allows the first main module to know the busyness of each submodule.

[0065] The task load is calculated based on the processing speed of each submodule and the load to be calculated. Task load = load to be calculated / processing speed. The task pressure faced by each submodule is quantified through the task load, which is convenient for ensuring the rationality of subsequent task allocation and is also an important basis for ensuring the efficient operation of the system.

[0066] Based on the calculated task load value, the first main module will strictly sort multiple sub-modules in order from large to small, and then obtain the first module sequence.

[0067] The first task sequence is matched with the first module sequence, and the subtasks and submodules are matched according to the order of the sequence.

[0068] After the match is successful, the first main module distributes the subtask to the matching submodule for processing.

[0069] The average processing speed of all submodules is calculated to get the average speed, which can reflect the average processing capacity of the entire system. The discrete coefficient of the load to be calculated of the submodule is calculated, which can show the dispersion of the load to be calculated of each submodule, and then understand the balance of task allocation in the system.

[0070] The cycle adjustment value is obtained by weighted calculation based on the speed average value and the dispersion coefficient; if the cycle adjustment value exceeds the preset adjustment reference range, the processing cycle is adjusted in a positive correlation with the cycle adjustment value; the larger the cycle adjustment value, the longer the processing cycle; the smaller the cycle adjustment value, the shorter the processing cycle.

[0071] Among them, the period adjustment value = weighting coefficient a1×speed average value + weighting coefficient a2×discrete coefficient;

[0072] Among them, the weighting coefficient a1 of the speed average value is a positive number; the weighting coefficient a2 of the dispersion coefficient is a negative number; a1+a2≠1.

[0073] The weighted coefficient of the speed average is a positive number, which means that the higher the speed average is, the greater the positive impact on the cycle adjustment value; the weighted coefficient of the dispersion coefficient is a negative number, which means that the larger the dispersion coefficient is, the greater the negative impact on the cycle adjustment value is. When the calculated cycle adjustment value exceeds the preset adjustment reference range, the system will immediately adjust it according to the positive correlation between the cycle adjustment value and the processing cycle, that is, the larger the cycle adjustment value is, the longer the processing cycle is; the smaller the cycle adjustment value is, the shorter the processing cycle is, so as to ensure that the entire system is always in an efficient and stable operating state.

[0074] Assume that in a distributed voice gateway system, there are 6 submodules, and their processing speeds (unit: tasks / second) are: 12, 10, 15, 8, 11, 9. Average speed = (12+10+15+8+11+9) ÷ 6 = 65 ÷ 6 ≈ 10.83 (tasks / second)

[0075] Calculate the dispersion coefficient. According to the existing calculation formula of the dispersion coefficient, it can be concluded that the dispersion coefficient of the load to be calculated for these 6 sub-modules is 0.4.

[0076] The weighted coefficients a1=0.7 and a2=-0.3 are set (satisfying a1+a2≠1). Here, the weighted coefficient a1 of the average speed is clearly defined as a positive number, which means that the higher the average speed, the greater the positive impact on the cycle adjustment value, because a faster average processing speed usually implies that the system is capable of taking on more tasks, and the processing cycle can be appropriately extended to optimize resource utilization; the weighted coefficient a2 of the discrete coefficient is a negative number, which means that the larger the discrete coefficient, the greater the negative impact on the cycle adjustment value. Since a larger discrete coefficient reflects an unbalanced task distribution, it may cause some modules to have high processing pressure. At this time, the processing cycle needs to be shortened to speed up task flow and relieve pressure. Then, the cycle adjustment value = weighted coefficient a1×average speed + weighted coefficient a2×discrete coefficient=7.461.

[0077] Assume that the preset adjustment reference range is 4 to 7. The calculated period adjustment value 7.461 exceeds the preset range.

[0078] According to the positive correlation between the cycle adjustment value and the processing cycle, because 7.461 is greater than the upper limit of the reference range, the processing cycle needs to be extended.

[0079] For example, the original processing cycle of the system is 500 milliseconds. Since the cycle adjustment value exceeds the range, according to a certain ratio, assuming that the processing cycle is extended by 100 milliseconds for every unit exceeding the upper limit of the reference range, the processing cycle is adjusted to 500+(7.461-7)×100=546.1 milliseconds.

[0080] Assume that after a period of time, the system task situation changes, and the processing speed of the submodule becomes: 10, 9, 11, 7, 8, 9. The recalculated average speed is (10+9+11+7+8+9)÷6=54÷6=9 (tasks / second), and the discrete coefficient becomes 0.3. Calculate the cycle adjustment value again: cycle adjustment value = 0.7×9+(-0.3)×0.3=6.21.

[0081] 6.21 is within the preset range of 4-7, so the system maintains the current processing cycle unchanged and continues to efficiently process tasks at the current rhythm, ensuring that the system can optimize the task processing flow by flexibly adjusting the processing cycle under different task loads and sub-module performance conditions.

[0082] By calculating the task load and sorting the submodules, the subtasks can be more accurately allocated to the appropriate submodules according to the actual processing capacity and load of each submodule, avoiding the problem of uneven task distribution in traditional parallel processing, making the workload of each submodule more balanced, improving the overall resource utilization, giving full play to the performance of each submodule, reducing the phenomenon of some chips being idle while some chips are running at high load, thereby improving the efficiency and quality of task processing. The cycle adjustment value is calculated based on the weighted average speed and the discrete coefficient, and the processing cycle is positively adjusted based on the value, which can make the processing cycle more flexible to adapt to the actual situation of the task. When the task load changes greatly, the discrete coefficient is large or the processing speed is slow, the processing cycle can be appropriately extended to avoid processing delays or errors in the submodule due to excessive tasks; when the task load is relatively stable and the submodule processing speed is fast, the processing cycle can be shortened to further improve the real-time performance of task processing and better meet the stringent real-time requirements of speech processing applications. This dynamic adjustment mechanism enables the system to maintain good performance and stability when facing speech processing tasks of different sizes and types, reduces system crashes or processing failures caused by sudden increases in task volume or complex task types, improves the reliability and robustness of the system, and provides a strong guarantee for the stable operation of speech processing related applications.

[0083] Reference Figure 2 , the steps of matching subtasks and submodules in sequence order also include the following steps:

[0084] Subtasks include analog signal tasks, data encoding tasks, and protocol flow tasks. The analog signal task involves basic operations such as the acquisition and preprocessing of the original voice signal, which are the foundation for the subsequent voice processing to be carried out accurately. The data encoding task focuses on encoding and converting voice information according to specific rules to meet the requirements of storage, transmission and other links. Its encoding quality and efficiency have a significant impact on the entire voice processing process. The protocol flow task is responsible for processing the protocol specifications followed by the transmission of voice data between different modules and devices to ensure smooth and accurate data flow. The comparison of the corresponding data volumes (also the priority level) of the three is: analog signal task < data encoding task < protocol flow task.

[0085] The processing rate of each submodule processing analog signal tasks is calculated as the acquisition rate, the processing rate of each submodule processing data encoding tasks is calculated as the encoding rate, and the processing rate of each submodule sending and receiving protocol stream tasks is calculated as the sending and receiving rate. For different types of subtasks, it is necessary to accurately measure the corresponding processing rate of each submodule. For analog signal tasks, the rate at which each submodule processes it is calculated, which is defined as the acquisition rate. The level of this acquisition rate depends on the performance of the hardware acquisition device of the submodule, such as the sensitivity and sampling frequency of the sensor, as well as the efficiency of the preliminary processing algorithm for the acquired signal at the software level. When processing data encoding tasks, the processing rate of each submodule is also calculated, which is called the encoding rate. It is limited by factors such as the advancement of the encoding algorithm carried by the submodule and the rationality of the allocation of computing resources. For protocol stream tasks, the rate at which each submodule sends and receives the task is measured, that is, the sending and receiving rate, which is closely related to the network interface performance, protocol parsing and encapsulation capabilities of the submodule.

[0086] After completing the rate measurement, enter the submodule definition phase: define the submodule with the highest encoding rate as the encoding submodule, define the submodule with the highest transceiver rate among the undefined submodules as the transceiver submodule, and define the submodule with the highest acquisition rate among the remaining submodules as the acquisition submodule. By comparing the encoding rates of each submodule horizontally, the submodule with the highest encoding rate is selected and defined as the encoding submodule. This type of submodule has outstanding advantages in data encoding tasks and can complete encoding tasks efficiently and accurately. Subsequently, among the submodules that have not yet been defined, a comparison is carried out again to find the submodule with the highest transceiver rate and define it as the transceiver submodule, which has the highest quality and efficiency in protocol stream task processing. Finally, among the remaining submodules, the submodule with the highest acquisition rate is determined as the acquisition submodule based on the acquisition rate, which has higher quality and efficiency in analog signal task processing.

[0087] Based on the pre-set task ratio, the task distribution process is started: based on the preset task ratio, the data encoding task in the first task sequence is distributed to the encoding submodule first, the protocol flow task in the first task sequence is distributed to the transceiver submodule, and the analog signal task in the first task sequence is distributed to the acquisition submodule first. The data encoding task in the first task sequence is distributed to the defined encoding submodule according to the priority principle, giving full play to its encoding expertise to ensure the high quality and high efficiency of the encoding task. The protocol flow tasks in the first task sequence are distributed to the transceiver submodule accordingly, and the smooth execution of the protocol flow tasks is guaranteed according to the selected transceiver processing capability; the analog signal tasks in the first task sequence are allocated to the acquisition submodule first, and its advantages in analog signal acquisition and processing are utilized to ensure the stable and efficient operation of voice processing. Through a series of interlocking steps, the precise matching of subtasks and submodules is achieved, providing guarantee for the efficient operation of the entire distributed voice gateway system.

[0088] For different types of subtasks (analog signal tasks, data encoding tasks, and protocol flow tasks), the processing rate of each submodule is calculated separately, such as the acquisition rate, encoding rate, and transceiver rate, and then the submodules specifically responsible for these rates are defined, namely the encoding submodule, transceiver submodule, and acquisition submodule. In this way, tasks of a specific type can be preferentially assigned to the submodule with the highest processing rate of the task, giving full play to the advantages of each submodule, allowing the subtask to be processed on the most suitable submodule, greatly improving the processing speed of each subtask, and thus improving the processing efficiency of the entire task sequence. Task distribution based on the preset task ratio makes task allocation more scientific and reasonable. Data encoding tasks are preferentially distributed to the encoding submodule with the highest encoding rate, protocol flow tasks are distributed to the transceiver submodule with the highest transceiver rate, and analog signal tasks are distributed to the acquisition submodule with the highest acquisition rate, avoiding waste and unreasonable use of resources, achieving optimal configuration of resources of each submodule, improving the overall resource utilization of the system, and making the system more efficient and stable when processing complex and diverse voice tasks.

[0089] Reference Figure 3 , the step of matching subtasks and submodules in sequence order also includes the following substeps:

[0090] The average value of the acquisition rate, encoding rate and transceiver rate is calculated as the comprehensive rate; the comprehensive rate can reflect the average processing capability level of the submodule when facing various types of voice processing subtasks. It integrates the performance of the submodule in various key business links and avoids the one-sidedness of a single rate measurement. Through the detailed statistics and average calculation of the acquisition rate, encoding rate and transceiver rate, a more objective and comprehensive basis can be provided for subsequent system decisions.

[0091] The task adjustment coefficient is obtained by weighted calculation based on the comprehensive rate and the periodic adjustment value; the task adjustment coefficient = weighted coefficient b1 × comprehensive rate + weighted coefficient b2 × periodic adjustment value; wherein, the weighted coefficient b1 and the weighted coefficient b2 are the weights corresponding to the comprehensive rate and the periodic adjustment value respectively, and b1+b2=1.

[0092] The task proportion is adjusted according to the positive correlation of the task adjustment coefficient. The larger the task adjustment coefficient, the higher the task proportion; the smaller the task adjustment coefficient, the lower the task proportion. When the task adjustment coefficient is larger, it indicates that the comprehensive processing capability of the current submodule and the task processing rhythm of the system are suitable for taking on more tasks, and the task proportion will increase accordingly; conversely, when the task adjustment coefficient is smaller, it means that the comprehensive processing capability of the submodule is limited or the task processing rhythm of the system needs to be slowed down, then the task proportion will decrease accordingly. Through this mechanism of dynamically adjusting the task proportion according to the task adjustment coefficient, the system can adapt to various changes in voice processing tasks in real time and flexibly, ensuring that each submodule is always in an efficient and reasonable task allocation state, thereby ensuring the stable and efficient operation of the entire distributed voice gateway system.

[0093] For example, suppose there are three submodules. The acquisition rate of submodule A for analog signal processing is 10 samples per second, the encoding rate of data encoding processing is 5 code units per second, and the sending and receiving rate of protocol flow processing is 8 packets per second; the corresponding acquisition rate of submodule B is 8 samples per second, the encoding rate is 6 code units per second, and the sending and receiving rate is 7 packets per second; the acquisition rate of submodule C is 12 samples per second, the encoding rate is 4 code units per second, and the sending and receiving rate is 9 packets per second. Then the comprehensive rate of submodule A is (10+5+8)÷3≈7.7, the comprehensive rate of submodule B is (8+6+7)÷3≈7, and the comprehensive rate of submodule C is (12+4+9)÷3≈8.3. This comprehensive rate can reflect the average processing capability level of the submodule when facing various types of voice processing subtasks. It integrates the performance of the submodule in various key business links and avoids the one-sidedness of single rate measurement. Through the careful statistics and average calculation of the acquisition rate, encoding rate and receiving and sending rate, a more objective and comprehensive basis can be provided for subsequent system decisions.

[0094] After obtaining the comprehensive rate, the system will introduce another key element, the periodic adjustment value, to jointly participate in the calculation of the task adjustment coefficient. The periodic adjustment value is calculated based on the system's weighted calculation of the average processing speed of the submodules and the load dispersion coefficient to be calculated. It reflects whether the current task processing rhythm of the system needs to be adjusted. Assuming that there are 5 submodules in the current system, their processing speeds are 15 tasks per second, 12 tasks per second, 18 tasks per second, 10 tasks per second, and 16 tasks per second, respectively. The average processing speed is calculated to be approximately 14.2 tasks per second; the load dispersion coefficient to be calculated is assumed to be 0.3. Assuming the weighted coefficient b1 is 0.6 and b2 is 0.4 (satisfying b1+b2=1), the periodic adjustment value = 0.6×14.2+0.4×(-0.3)=8.52-0.12=8.4. The comprehensive rate and this periodic adjustment value with important indicative significance are calculated according to a specific weighted algorithm to finally obtain the task adjustment coefficient. During this process, the weighted algorithm fully considers the comprehensive processing capabilities of the sub-modules represented by the comprehensive rate, and the dynamic requirements of system task processing represented by the periodic adjustment value, so that the calculated task adjustment coefficient can accurately match the current operating status of the system.

[0095] According to the calculated task adjustment coefficient, the system will dynamically adjust the preset task proportion. The task adjustment coefficient is positively correlated with the task proportion. That is to say, when the task adjustment coefficient is larger, it indicates that the comprehensive processing capability of the current submodule and the task processing rhythm of the system are suitable for taking on more tasks, and the task proportion will increase accordingly; on the contrary, when the task adjustment coefficient is smaller, it means that the comprehensive processing capability of the submodule is limited or the task processing rhythm of the system needs to be slowed down, then the task proportion will decrease accordingly. For example, the initial preset task proportion is 30% for data encoding tasks, 30% for protocol flow tasks, and 40% for analog signal tasks. When the task adjustment coefficient of a submodule is calculated to be larger, and the task adjustment coefficient is within another empirical range, the data encoding task proportion is increased to 40%, the protocol flow task proportion is increased to 35%, and the analog signal task proportion is reduced to 25%, so as to give full play to the advantages of the submodule and adapt to system changes. Through this mechanism of dynamically adjusting the task proportion according to the task adjustment coefficient, the system can adapt to various changes in voice processing tasks in real time and flexibly, ensuring that each submodule is always in an efficient and reasonable task allocation state, thereby ensuring the stable and efficient operation of the entire distributed voice gateway system.

[0096] Based on the preset task ratio, the step of distributing the data encoding tasks in the first task sequence to the encoding submodule in priority also includes the following steps:

[0097] Obtain the working status data of the submodule, and calculate the load from the working status data.

[0098] The task proportion of the submodule is adjusted according to the anti-correlation of the load. The larger the load, the smaller the task proportion; the smaller the load, the larger the task proportion.

[0099] First, in order to accurately control the real-time operating status of the submodules, the system will continuously and timely obtain the submodule working status data. The sources of these working status data are wide and diverse, covering the number of tasks currently being processed by the submodule, the progress of task processing, the proportion of system resources occupied, and various performance indicator feedback during the task processing process, such as CPU usage, memory usage, etc. Through the comprehensive collection of these rich data, the system can have a comprehensive and three-dimensional understanding of the workload of the submodule.

[0100] Next, based on the detailed working status data obtained, the system's built-in algorithm is used to accurately calculate the load. The load is not a simple single indicator, but a quantitative result after comprehensive consideration of multiple factors. For example, if a submodule is currently processing 20 data encoding tasks in parallel, and the average processing progress of these tasks is only 30%, and its CPU usage is as high as 80%, and its memory usage is 70%, after assigning specific weights to these indicators and calculating them, the weighted calculation results in a load value of 0.75 for the submodule.

[0101] The specific process is as follows: Assume that the task processing progress, CPU usage, and memory occupancy are assigned weights w1, w2, and w3 respectively, and w1+w2+w3=1. In order to facilitate calculation and reasonably reflect the impact of each factor on the load, assume that w1=0.3, w2=0.4, and w3=0.3. First, normalize the task processing progress and convert the average processing progress of 30% into a contribution value to the load. Because the lower the processing progress, the higher the load, so the contribution value of the task processing progress to the load is 1-0.3=0.7.

[0102] The CPU usage is directly used as the contribution to the load, which is 0.8.

[0103] The memory usage is also directly used as the contribution value to the load, that is, 0.7. Then the load is calculated according to the weighted calculation formula: L = w1 × (1-task processing progress) + w2 × CPU usage + w3 × memory usage = 0.3 × 0.7-0.4 × 0.8 + 0.3 × 0.7 = 0.21 + 0.32 + 0.21 = 0.75.

[0104] Finally, based on the calculated load, the system performs a key adjustment action, that is, adjusting the task proportion of the submodule according to the anti-correlation of the load. This means that when the load is larger, it indicates that the submodule is currently under greater work pressure. In order to avoid problems such as task backlog, processing delays, and even system crashes, the system will intelligently reduce its task proportion. On the contrary, when the load is small, it means that the submodule still has sufficient processing capacity. At this time, the system will appropriately increase its task proportion, so as to give full play to the performance advantages of the submodule and ensure that the entire distributed voice gateway system is always in an efficient and stable operating state. For example, the initial data encoding task proportion of a submodule is set to 40%. When it is monitored that its load increases to 0.8, the system will reduce its task proportion to 30%; if the load decreases to 0.3, the task proportion will be increased to 50%. Through this dynamic and intelligent adjustment mechanism, task allocation can be continuously optimized and system performance can be continuously improved.

[0105] Based on the preset task ratio, the step of distributing the data encoding tasks in the first task sequence to the encoding submodule in priority also includes the following steps:

[0106] Obtain historical working status data of the submodule, and calculate the historical error rate from the historical working status data;

[0107] The task proportion of the sub-module is adjusted according to the historical error rate. The larger the historical error rate, the smaller the task proportion of the sub-module; the smaller the historical error rate, the larger the task proportion of the sub-module.

[0108] First, in order to comprehensively evaluate the reliability and stability of the submodules, the system will collect the historical working status data of the submodules. These historical data are like a detailed archive, recording the details of the submodules in the past when performing various tasks, including but not limited to the total amount of data encoding tasks that have been processed, the accuracy of task completion in different time periods, the type and frequency of errors, and the corresponding system environment parameters when each error occurs, such as the network stability and hardware temperature at the time. By deeply mining this huge historical information database, the system can trace back the working trajectory of the submodule and accurately understand its performance in the long-term operation process.

[0109] Next, based on the rich historical work status data obtained, the statistical analysis algorithm accurately calculates the historical error rate. This historical error rate is not a simple statistic of the number of errors, but a quantitative result after comprehensively considering multiple factors such as the severity of the error and the scope of impact on subsequent task processes. For example, if a submodule has processed 500 data encoding tasks in the past month, there are 20 tasks with minor errors (such as minor flaws in the encoding format that do not affect the basic availability of the data), 10 tasks with moderate errors (such as partial data loss, which requires re-encoding and repair), and 5 tasks with serious errors (such as complete encoding errors that make the data unusable). By assigning corresponding weights to errors of different degrees (assuming that the weight of minor errors is 1, the weight of moderate errors is 3, and the weight of serious errors is 5) and calculating, the historical error rate value of this submodule is 0.13.

[0110] Finally, based on the calculated historical error rate, the system implements a crucial optimization strategy, namely, adjusting the task proportion of the submodule according to the historical error rate. This means that when the historical error rate is larger, it indicates that the submodule has exposed more problems in past work and its reliability is relatively low. In order to reduce the risk of overall task processing, the system will wisely reduce its task proportion. On the contrary, when the historical error rate is small, it means that the submodule has been stable and reliable in the past. At this time, the system will appropriately increase its task proportion, so as to give full play to the advantages of the submodule and ensure that the entire distributed voice gateway system is always in an efficient, stable and low-risk operation state. For example, the data encoding task proportion of a submodule is initially set to 40%. When its historical error rate is detected to increase to 0.2, the system will reduce its task proportion to 30%; if the historical error rate is reduced to 0.05, the task proportion will be increased to 50%. Through this dynamic and intelligent adjustment mechanism that takes into account both historical performance and current needs, task allocation can be continuously optimized, system performance can be continuously improved, and the system's risk resistance ability can be significantly enhanced.

[0111] The steps of matching subtasks and submodules in sequence order also include the following steps:

[0112] Based on the acquired first task amount, the encoding submodule sends a change request to the first main module to change the acquisition submodule to the encoding submodule.

[0113] Based on the acquired second task amount, the encoding submodule sends a second change request to the first main module to change the transceiver submodule to the encoding submodule, wherein the second task amount is greater than the first task amount.

[0114] First, when the system is running, the encoding submodule will monitor the task inflow in real time and accurately obtain the first task volume. The statistical scope of this first task volume covers many aspects, including not only the amount of voice data that is newly connected and clearly needs to be encoded and processed at the current moment, but also the scale of the same type of encoding tasks that are estimated to be in the short term based on past task processing experience, as well as the potential impact of factors such as the current system network delay and upstream data generation rate fluctuations on the encoding task volume. Once the encoding submodule determines that the first task volume reaches or exceeds the pre-set threshold related to task processing efficiency and resource allocation rationality, it will quickly send a change request to the first main module. This request is intended to temporarily change the acquisition submodule to the encoding submodule. Its purpose is to use the idle or deployable computing resources of the acquisition submodule to quickly expand the encoding processing capabilities to cope with the sudden increase in encoding task pressure.

[0115] Subsequently, the system continues to operate, and the encoding submodule also maintains a keen grasp of the task dynamics, thereby obtaining the second task volume. The basis for determining the second task volume is similar to that of the first task volume, but due to factors such as different time periods and business scenario switching, there are differences in data sources and considerations. For example, during peak voice communication periods, or when the system undertakes a large-scale voice data transcoding task, the second task volume monitored by the encoding submodule will show significant changes. When this value meets the specific change trigger condition, the encoding submodule will immediately send a second change request to the first main module, intending to convert the transceiver submodule to the encoding submodule. This operation fully takes into account that under certain specific working conditions, the transceiver submodule is originally responsible for a relatively reduced amount of protocol stream transceiver tasks, and can release considerable computing power. Reconfiguring it as a coding submodule can further optimize system resource allocation, ensure efficient and timely processing of coding tasks, and ensure that the entire distributed voice gateway system always maintains a stable and efficient operating state in a complex and changing task environment.

[0116] In order to ensure that the master and slave modules have separate network environments and improve the quality and efficiency of communication, the first master module is configured with multiple network interfaces, one of which is in a separate network segment and is used to communicate with the submodules to achieve data forwarding and heartbeat packet sending.

[0117] Through a special network interface configuration method, it is intended to ensure that the master and slave modules have an independent network environment isolated from external interference. By opening up a separate network segment for communication with the sub-modules, such as setting the network interface of the first master module for this communication to 169.254.0.2, and the sub-modules are configured with different IP addresses such as 169.254.0.3, 169.254.0.4, etc., they are limited to interact in the same exclusive network segment. In this way, in the complex and changeable actual operating environment filled with various types of network traffic, the interference caused by the intertwined network flows between different devices and applications can be effectively avoided. Because under the conventional network layout, many devices and applications share the same network space, and the massive network traffic they generate can easily cause communication delays, and even cause adverse consequences such as data loss. However, the current independent network segment design creates a relatively independent and stable network for communication between the first master module and the sub-modules. On the one hand, it reduces the interference of other external network activities on the communication between the two, so that data can be transmitted along a stable and smooth channel during the forwarding process, greatly improving the reliability of data forwarding; on the other hand, a stable and reliable communication link is essential for the sending and receiving of heartbeat packets. The heartbeat packet regularly monitors the connection status between the main module and the sub-module to ensure that the communication link is always in normal operation. With the stable communication guaranteed by the independent network segment, the heartbeat packet can shuttle between the master and slave modules on time and accurately. Once any sub-module has abnormal conditions such as disconnection or failure, it can be quickly detected by relying on the timely feedback of the heartbeat packet, which prompts the system to quickly take countermeasures such as reconnection and task reallocation, which fully guarantees the stability of voice processing task data transmission and lays a solid foundation for the stable and efficient operation of the entire distributed voice gateway system.

[0118] The steps of matching subtasks and submodules in sequence order also include the following steps:

[0119] Based on the acquired third task amount, the encoding submodule sends a third change request to the second main module to change the acquisition submodule or the transceiver submodule of the second main module to the encoding submodule.

[0120] Based on the acquired fourth task amount, the encoding submodule sends its own task amount to the encoding submodule controlled by the second main module, wherein the fourth task amount is greater than the third task amount, and the third task amount is greater than the second task amount.

[0121] First, as the system continues to run and the voice processing tasks change dynamically, the encoding submodule always keeps a close monitoring of the task load. When it obtains the third task volume based on the precise monitoring mechanism, it will quickly start the resource allocation process. The third task volume here covers the results of comprehensive consideration of multiple factors, including the scale of voice data that is currently pouring in and urgently needs to be encoded, and the short-term encoding task increment estimated by the recent task trend. At the same time, combined with the system's real-time performance indicator feedback, such as CPU usage, memory occupancy and other information to determine whether additional encoding resource support is needed. Once it is determined that the third task volume reaches or exceeds the key threshold preset by the system, the encoding submodule will decisively send a third change request to the second main module. The core purpose of this request is to accurately select the acquisition submodule or the transceiver submodule from the submodule resource pool controlled by the second main module, and temporarily change it to the encoding submodule. This strategy makes full use of the architectural advantages of distributed systems, breaks the limitations of resource allocation under a single main module, and realizes flexible resource integration across main modules, ensuring that when faced with sudden or high-load encoding tasks, the system can quickly expand its encoding processing capabilities and maintain the efficiency and stability of overall task processing.

[0122] Subsequently, the encoding submodule will also obtain the fourth task volume based on real-time monitoring. The basis for determining the fourth task volume is similar to that of the third task volume, but the focus is on the saturation of its own task processing and the balanced distribution requirements of the encoding tasks in the system. When the encoding submodule detects that its own task volume has reached a certain level, which may affect the overall processing efficiency or cause task backlogs, it will immediately and accurately transmit its own task volume information to the encoding submodule controlled by the second main module. Through this cross-main module task volume sharing and coordination mechanism, the second main module can reasonably allocate tasks from other modules according to the real-time load and idle resources of its encoding submodules, and realize the dynamic balance of encoding tasks among multiple encoding submodules. This not only avoids the dilemma of a single encoding submodule falling into processing delays or frequent errors due to task overload, but also fully taps the potential processing capabilities of each encoding submodule in the system, further optimizes the task allocation strategy of the entire distributed voice gateway system, enhances the system's comprehensive strength in coping with complex and changeable voice processing tasks, and ensures that the system can operate stably and efficiently under various working conditions.

[0123] Note: All calculations in this example are dimensionless calculations.

[0124] The embodiment of the present application also discloses a task processing system based on a distributed voice gateway, including a processor, in which the steps of any one of the above-mentioned task processing methods based on a distributed voice gateway are executed.

[0125] The embodiment of the present application also discloses a storage medium, in which a program is stored. When the program is executed by a processor, the steps of any one of the above-mentioned task processing methods based on a distributed voice gateway are implemented.

[0126] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A task processing method based on a distributed voice gateway, characterized in that: The steps include: The first main module acquires a first task sequence according to a set processing cycle, wherein the first task sequence includes a plurality of subtasks; The first main module reads the processing speed and the load to be calculated of the multiple connected submodules; Calculate the task load according to the processing speed of each submodule and the load to be calculated, wherein the task load=the load to be calculated / the processing speed; Sort the plurality of submodules from large to small according to the task load to obtain a first module sequence; Matching the first task sequence with the first module sequence, and matching the subtasks and the submodules according to the order of the sequences; After the match is successful, the first main module distributes the subtask to the matched submodule for processing; Calculating the average value of the processing speed of all the submodules to obtain a speed average value; calculating the dispersion coefficient of the load to be calculated of the submodule; A period adjustment value is obtained by weighted calculation according to the speed average value and the discrete coefficient; if the period adjustment value exceeds a preset adjustment reference range, the processing period is adjusted in a positive correlation with the period adjustment value; the larger the period adjustment value, the longer the processing period; the smaller the period adjustment value, the shorter the processing period; The subtasks include analog signal tasks, data encoding tasks and protocol flow tasks; Calculate the processing rate of each submodule processing the analog signal task as the acquisition rate, calculate the processing rate of each submodule processing the data encoding task as the encoding rate, and calculate the processing rate of each submodule transceiving and processing the protocol stream task as the transceiving rate; The submodule with the highest encoding rate is defined as an encoding submodule, the submodule with the highest transceiver rate among the undefined submodules is defined as a transceiver submodule, and the submodule with the highest acquisition rate among the remaining submodules is defined as an acquisition submodule; Based on the preset task ratio, the data encoding task in the first task sequence is distributed to the encoding submodule in priority, the protocol flow task in the first task sequence is distributed to the transceiver submodule in priority, and the analog signal task in the first task sequence is distributed to the acquisition submodule in priority.

2. The task processing method based on a distributed voice gateway according to claim 1 is characterized in that: The step of matching the subtasks and the submodules in sequence order further includes the following sub-steps: Calculating an average value of the acquisition rate, the encoding rate, and the transceiver rate as a comprehensive rate; A task adjustment coefficient is obtained by performing weighted calculation according to the comprehensive rate and the period adjustment value; The task proportion is adjusted according to the task adjustment coefficient in a positive correlation, and the larger the task adjustment coefficient is, the higher the task proportion is; The smaller the task adjustment coefficient is, the lower the task proportion is.

3. The task processing method based on a distributed voice gateway according to claim 1 is characterized in that: The step of preferentially distributing the data encoding tasks in the first task sequence to the encoding submodule based on the preset task proportion further includes the following steps: Acquiring the working status data of the submodule, and calculating the load from the working status data; The task proportion of the submodule is adjusted according to the inverse correlation of the load. The larger the load, the smaller the task proportion; and the smaller the load, the larger the task proportion.

4. The task processing method based on a distributed voice gateway according to claim 1 is characterized in that: The step of preferentially distributing the data encoding tasks in the first task sequence to the encoding submodule based on the preset task proportion further includes the following steps: Acquire historical working status data of the submodule, and calculate a historical error rate from the historical working status data; The task proportion of the submodule is adjusted according to the historical error rate. The larger the historical error rate is, the smaller the task proportion of the submodule is; and the smaller the historical error rate is, the larger the task proportion of the submodule is.

5. The task processing method based on distributed voice gateway according to claim 1 is characterized in that: The step of matching the subtasks and the submodules in sequence order further includes the following steps: Based on the acquired first task amount, the encoding submodule sends a change request to the first main module to change the acquisition submodule to the encoding submodule; Based on the acquired second task amount, the encoding submodule sends a second change request to the first main module to change the transceiver submodule to the encoding submodule.

6. The task processing method based on distributed voice gateway according to claim 5 is characterized in that: The first main module is configured with multiple network interfaces, one of which is in a separate network segment and is used to communicate with the sub-module to achieve data forwarding and sending of heartbeat packets.

7. The task processing method based on a distributed voice gateway according to claim 5 is characterized in that: The step of matching the subtasks and the submodules in sequence order further includes the following steps: Based on the acquired third task amount, the encoding submodule sends a third change request to the second main module to change the acquisition submodule or the transceiver submodule of the second main module to the encoding submodule; Based on the acquired fourth task amount, the encoding submodule sends its own task amount to the encoding submodule controlled by the second main module.

8. A task processing system based on a distributed voice gateway, characterized in that: It includes a processor, in which the steps of the task processing method based on a distributed voice gateway as described in any one of claims 1-7 are executed.

9. A storage medium, characterized in that: The medium stores a program, and when the program is executed by the processor, the steps of the task processing method based on a distributed voice gateway described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Task processing method, device, system, equipment and medium

    CN114443236A

  • Task distributed decomposition and distribution method and device, storage medium and equipment

    CN117472565A