A service scheduling method and device
Patent Information
- Application Number
- CN202210271695.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-03-18
AI Technical Summary
[0004]本发明的目的是提供一种服务调度方法和装置,以避免现有技术方案中的服务调度方案精确度低或者服务调度方案复杂的问题
[0075]上述技术方案中,所述方法包括获取所述网络设备存储的服务集群状态数据以及目标用户发送的当前用户信息;根据所述服务集群状态数据和所述当前用户信息,依据预设优先级评分规则,确定优先级最高的服务实例;根据所述优先级最高的服务实例为所述目标用户提供服务。本发明通过设置预设优先级评分规则,来确定优先级最高的服务实例为所述目标用户提供服务,从而保证最佳的服务质量。
Smart Images

Figure CN116800758B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a service scheduling method and apparatus. Background Technology
[0002] To support larger-scale business operations and improve service availability and concurrency, mainstream service providers have adopted distributed architectures to deploy services across multiple instances. Service scheduling has become a key technical challenge affecting service performance, and existing service scheduling technologies mainly fall into two categories: function scoring and model prediction.
[0003] For the function-based scoring scheme, only the function score is used as the basis for scheduling during the decision-making process. Inaccurate function settings will lead to inaccurate service scheduling. For the model-based prediction scheme, extensive user behavior data collection and long-term model training are required, placing high demands on service storage and computing power. Summary of the Invention
[0004] The purpose of this invention is to provide a service scheduling method and apparatus to avoid the problems of low accuracy or complexity in existing service scheduling schemes.
[0005] To achieve the above objectives, embodiments of the present invention provide a service scheduling method, executed by a network device, comprising:
[0006] Obtain the service cluster status data stored in the network device and the current user information sent by the target user;
[0007] Based on the service cluster status data and the current user information, the service instance with the highest priority is determined according to the preset priority scoring rules;
[0008] Provide services to the target user based on the highest priority service instance.
[0009] Optionally, determining the highest-priority service instance based on the service cluster status data and the current user information, according to a preset priority scoring rule, includes:
[0010] Determine the information of N service instances in the service cluster status data, where each service instance information includes: load level, number of users, and distance between the service instance and the target user;
[0011] Based on the current user information and according to the priority allocation principle of the N service instance information, the service instance with the highest priority is determined; where N≥3;
[0012] The priority of the service instance being the lowest load, the fewest number of users, and the shortest distance between the service instance and the target user decreases in that order.
[0013] Optionally, determining the highest-priority service instance based on the current user information and the priority allocation principle of the N service instance information includes:
[0014] Within the same cluster node, the service instance with the highest priority among the N service instances whose load level does not exceed the load threshold and which has the largest number of users; or...
[0015] Within the same cluster node, if the load levels of all N service instances do not exceed the load threshold, and the number of users is the same, then the service instance with the lowest load level is selected to determine the service instance with the highest priority; or,
[0016] In a multi-cluster node environment, if the load and number of users are the same among the N service instance information, then the service instance with the shortest distance to the target user is selected to determine the service instance with the highest priority; or,
[0017] If the load of all N service instances exceeds the load threshold, then a candidate service cluster is obtained, and the service instance in the candidate service cluster that is closest to the target user and whose load does not exceed the load threshold is determined as the service instance with the highest priority.
[0018] Optionally, determining the load factor includes:
[0019] Based on the service cluster status data, determine the CPU, memory, and bandwidth usage of each service instance.
[0020] The load level is obtained based on the CPU, the memory, and the bandwidth utilization.
[0021] Optionally, the load level can be obtained based on the CPU, the memory, and the bandwidth utilization, including:
[0022] Determine the first product of the CPU and the first preset weight value, the second product of the memory and the second preset weight value, and the third product of the bandwidth utilization and the third preset weight value;
[0023] The load factor is determined based on the first product, the second product, and the third product.
[0024] Optionally, after providing services to the target user based on the highest-priority service instance, the method further includes:
[0025] Obtain the performance metrics reported by the target user;
[0026] Based on the performance metrics, determine the running status of the highest priority service instance.
[0027] Optionally, the performance metrics include video frame rate, latency, and packet loss rate information;
[0028] Determining the running status of the highest priority service instance based on the performance metrics includes:
[0029] If the video frame rate is greater than the first threshold, the latency is less than the second threshold, and the packet loss rate is less than the third threshold, then the highest priority service instance is determined to be in an idle state.
[0030] If the video frame rate is between the fourth threshold and the first threshold, or the latency is between the second threshold and the fifth threshold, or the packet loss rate is between the third threshold and the sixth threshold, the highest priority service instance is determined to be in a fully loaded state.
[0031] If the video frame rate is between 0fps and the fourth threshold, or the latency is greater than the fifth threshold, or the packet loss rate is greater than the sixth threshold, the highest priority service instance is determined to be in an overloaded state.
[0032] Optionally, the method further includes:
[0033] Obtain the current load of the highest priority service instance;
[0034] The current load of the highest priority service instance is adjusted in real time based on its running status.
[0035] Optionally, when CPU is the first weight in the current load, memory is the second weight in the current load, and bandwidth utilization is the third weight in the current load,
[0036] The step of adjusting the current load of the highest priority service instance in real time based on its running status includes:
[0037] If the highest priority service instance is in an idle state, then the current load threshold of the highest priority service instance is increased by a first preset range.
[0038] If the highest priority service instance is fully loaded, maintain the current load threshold of the highest priority service instance unchanged, adjust the first weight, the second weight and the third weight, and reacquire the highest priority service instance;
[0039] If the highest priority service instance is overloaded, the current load threshold of the highest priority service instance will be reduced to a second preset range.
[0040] To achieve the above objectives, embodiments of the present invention also provide a service scheduling apparatus, comprising:
[0041] The acquisition module is used to acquire service cluster status data stored by the network device and current user information sent by the target user;
[0042] The determination module is used to determine the service instance with the highest priority based on the service cluster status data and the current user information, according to a preset priority scoring rule;
[0043] The processing module is used to provide services to the target user based on the highest priority service instance.
[0044] Optionally, the determining module includes:
[0045] The first determining submodule is used to determine the information of N service instances in the service cluster status data, and each service instance information includes: load degree, number of users, and distance between the service instance and the target user;
[0046] The second determining submodule is used to determine the service instance with the highest priority based on the current user information and the priority allocation principle of the N service instance information; wherein, N≥3;
[0047] The priority of the service instance being the lowest load, the fewest number of users, and the shortest distance between the service instance and the target user decreases in that order.
[0048] Optionally, the second determining submodule includes:
[0049] The first determining unit is configured to, within the same cluster node, determine the service instance with the highest priority among the N service instance information whose load level does not exceed the load threshold and which has the largest number of users; or...
[0050] The second determining unit is configured to, within the same cluster node, if the load levels of none of the N service instance information exceed the load threshold, and the number of users is the same, select the service instance with the lowest load level to determine the service instance with the highest priority; or...
[0051] The third determining unit is configured to, when multiple cluster nodes have the same load and number of users among the N service instance information, select the service instance with the shortest distance to the target user, thus determining the service instance with the highest priority; or...
[0052] The fourth determining unit is used to obtain a candidate service cluster if the load degree of all N service instance information exceeds the load threshold, and to determine the service instance with the shortest distance to the target user and whose load degree does not exceed the load threshold in the candidate service cluster, and to determine the service instance with the highest priority.
[0053] Optionally, the second determining submodule further includes:
[0054] The fifth determining unit is used to determine the CPU, memory, and bandwidth usage of each service instance based on the service cluster status data.
[0055] The unit is used to obtain the load level based on the CPU, the memory, and the bandwidth utilization.
[0056] Optionally, the obtaining unit includes:
[0057] The first determining subunit is used to determine the first product of the CPU and the first preset weight value, the second product of the memory and the second preset weight value, and the third product of the bandwidth utilization rate and the third preset weight value.
[0058] The second determining subunit is used to determine the load degree based on the first product, the second product, and the third product.
[0059] Optionally, the device further includes:
[0060] The second acquisition module is used to acquire the performance metrics fed back by the target user.
[0061] The second determining module is used to determine the running status of the highest priority service instance based on the performance indicators.
[0062] Optionally, the second determining module includes:
[0063] The sixth determining unit is configured to determine that the highest priority service instance is in an idle state if the video frame rate is greater than a first threshold, the latency is less than a second threshold, and the packet loss rate is less than a third threshold.
[0064] The seventh determining unit is configured to determine that the highest priority service instance is in a fully loaded state when the video frame rate is between the fourth threshold and the first threshold, or the latency is between the second threshold and the fifth threshold, or the packet loss rate information is between the third threshold and the sixth threshold.
[0065] The eighth determining unit is used to determine that the highest priority service instance is in an overload state if the video frame rate is between 0fps and the fourth threshold, or the latency is greater than the fifth threshold, or the packet loss rate is greater than the sixth threshold.
[0066] Optionally, the device further includes:
[0067] The third acquisition module is used to acquire the current load of the highest priority service instance;
[0068] The adjustment module is used to adjust the current load of the highest priority service instance in real time based on the running status of the highest priority service instance.
[0069] Optionally, the adjustment module includes:
[0070] The first processing unit is configured to increase the current load threshold of the highest priority service instance by a first preset range if the highest priority service instance is in an idle state.
[0071] The second processing unit is configured to, if the highest priority service instance is in a fully loaded state, maintain the current load threshold of the highest priority service instance unchanged, adjust the first weight, the second weight and the third weight, and reacquire the highest priority service instance;
[0072] The third processing unit is used to reduce the current load threshold of the highest priority service instance to a second preset range if the highest priority service instance is in an overloaded state.
[0073] To achieve the above objectives, embodiments of the present invention also provide a readable storage medium having a program or instructions stored thereon, which, when executed by a processor, implement the steps in the service scheduling method as described in any of the preceding claims.
[0074] The beneficial effects of the above-described technical solution of the present invention are as follows:
[0075] In the above technical solution, the method includes acquiring service cluster status data stored by the network device and current user information sent by the target user; determining the highest priority service instance based on the service cluster status data and the current user information according to a preset priority scoring rule; and providing service to the target user based on the highest priority service instance. This invention ensures optimal service quality by setting a preset priority scoring rule to determine the highest priority service instance to provide service to the target user. Attached Figure Description
[0076] Figure 1 This is a flowchart illustrating the service scheduling method according to an embodiment of the present invention;
[0077] Figure 2 This is a flowchart illustrating the service scheduling architecture of an embodiment of the present invention;
[0078] Figure 3 This is a schematic diagram illustrating the specific process of the service scheduling method according to an embodiment of the present invention;
[0079] Figure 4 This is a schematic diagram of the service scheduling device according to an embodiment of the present invention. Detailed Implementation
[0080] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0081] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0082] In various embodiments of the present invention, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0083] In addition, the terms "system" and "network" are often used interchangeably in this article.
[0084] In the embodiments provided in this application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0085] like Figure 1 As shown, a method applied to the above-described service scheduling architecture is provided, specifically an optional embodiment of the present invention, which provides a service scheduling method executed by a network device, comprising:
[0086] Step 100: Obtain the service cluster status data stored in the network device and the current user information sent by the target user;
[0087] Here, the service cluster status data refers to service instances reported in real time, preferably real-time audio / video service instances. The status of these audio / video service instances is updated and stored in real time. The information reported by the audio / video service instances includes deployment location, CPU utilization, memory utilization, network I / O bandwidth, etc.
[0088] Step 200: Based on the service cluster status data and the current user information, determine the service instance with the highest priority according to the preset priority scoring rules;
[0089] In this embodiment, the preset priority scoring rule is applied to determine the service instance with the highest priority. It should be noted that the preset priority scoring rule can be adjusted in real time, thereby achieving the goal of determining the service instance with the highest priority in real time and avoiding the problem of low scheduling accuracy caused by determining the best service instance for a fixed function.
[0090] Step 300: Provide services to the target user based on the highest priority service instance.
[0091] In this embodiment, the present invention determines the highest priority service instance to provide services to the target user by setting a preset priority scoring rule, thereby ensuring the best service quality.
[0092] Optionally, step 200 includes:
[0093] Step 210: Determine the information of N service instances in the service cluster status data. The information of each service instance includes: load, number of users, and distance between the service instance and the target user.
[0094] Step 220: Based on the current user information and according to the priority allocation principle of the N service instance information, determine the service instance with the highest priority; where N≥3;
[0095] The priority of the service instance being the lowest load, the fewest number of users, and the shortest distance between the service instance and the target user decreases in that order.
[0096] In this embodiment, the preset priority scoring rule is the key point of the invention. This preset priority scoring rule, based on a priority-based scoring algorithm, selects the best instance for the user to provide real-time audio and video services. The algorithm design is based on three fundamental principles:
[0097] First, under the premise of low service instance load, assigning users in the same room to the same service instance can reduce the number of data forwardings, reduce communication latency, and reduce the overall load of the service cluster. Second, due to limited CPU, memory, and network bandwidth resources, the quality of real-time audio and video services will drop significantly when the load of a single service instance is too high. Finally, excessive access distance between users and service instances will have a certain impact on the latency and stability of real-time audio and video communication. Here, the priority of the lowest load, the fewest number of users, and the shortest distance between the service instance and the target user decreases in that order.
[0098] Optionally, step 220 includes:
[0099] Within the same cluster node, the service instance with the highest priority among the N service instances whose load level does not exceed the load threshold and which has the largest number of users; or...
[0100] Within the same cluster node, if the load levels of all N service instances do not exceed the load threshold, and the number of users is the same, then the service instance with the lowest load level is selected to determine the service instance with the highest priority; or,
[0101] In a multi-cluster node environment, if the load and number of users are the same among the N service instance information, then the service instance with the shortest distance to the target user is selected to determine the service instance with the highest priority; or,
[0102] If the load of all N service instances exceeds the load threshold, then a candidate service cluster is obtained, and the service instance in the candidate service cluster that is closest to the target user and whose load does not exceed the load threshold is determined as the service instance with the highest priority.
[0103] In this embodiment, the specific process is as follows:
[0104] 1. Based on the current user information, the service instance with the largest number of users in the same room (under the same cluster node) and whose load does not exceed the load threshold is selected as the highest priority service instance.
[0105] 2. If several service instances are in the same room (under the same cluster node), have the same number of users, and all have a load exceeding the load threshold, then select the service instance with the lowest load and determine the service instance with the highest priority.
[0106] 3. If several service instances with the same number of users and load are present in multiple cluster nodes, the service instance with the shortest distance to the target user is selected to determine the service instance with the highest priority.
[0107] 4. If the load of all N service instances exceeds the load threshold, a candidate service cluster is obtained. If the load of all candidate instances in the candidate service cluster exceeds the threshold, a preset algorithm, such as the GEO hash algorithm, is used to calculate the distance between the current user and each instance node. The service instance in the candidate service cluster with the shortest distance to the target user and whose load does not exceed the load threshold is determined, and the service instance with the highest priority is determined.
[0108] This embodiment allows service instances to dynamically adjust their access based on the priority of the data to be accessed. Specifically, when server resources are limited, they are allocated to high-priority data access; when the server is idle, resources are allocated to backlogged low-priority data access. Prioritizing data access ensures efficient and reasonable data access, guaranteeing that high-priority data is accessed first.
[0109] Optionally, determining the load factor includes:
[0110] Based on the service cluster status data, determine the CPU, memory, and bandwidth usage of each service instance.
[0111] The load level is obtained based on the CPU, the memory, and the bandwidth utilization.
[0112] Specifically, the load threshold is obtained based on the CPU, the memory, and the bandwidth utilization, including:
[0113] Determine the first product of the CPU and the first preset weight value, the second product of the memory and the second preset weight value, and the third product of the bandwidth utilization and the third preset weight value;
[0114] The load threshold is determined based on the first product, the second product, and the third product.
[0115] In this embodiment, when it is necessary to determine whether the load of a service instance exceeds the load threshold, the load calculation formula is as follows: p = ax1 + bx2 + cx3; where x1, x2, and x3 represent the CPU, memory, and bandwidth utilization of the service instance, respectively, and a, b, and c represent the weights of the above three performance indicators. The initial value of the three weights is 1, the maximum load value is 300, and the initial value of the load threshold is preferably 240 (80%). Of course, it can be modified adaptively according to the specific instance, and this invention is not limited.
[0116] This invention determines the current user's load level in real time based on the performance index, thereby judging whether the load level of the service instance exceeds the load threshold, thus enabling the monitoring of the current service instance and ensuring reasonable and efficient data access.
[0117] Optionally, after step 300, the method further includes:
[0118] Step 400: Obtain the performance metrics reported by the target user;
[0119] Step 500: Determine the running status of the highest priority service instance based on the performance metrics.
[0120] In this embodiment, to more accurately schedule service instances, the invention introduces feedback adjustment. Based on performance metrics reported by users, such as real-time audio and video quality, the service load threshold and the weights of each parameter in the load calculation formula are dynamically adjusted. That is, through supervised learning, the parameter weights are gradually optimized to obtain a unique scoring algorithm for specific service instances. This invention implements a scheduling algorithm for real-time audio and video services in multi-instance scenarios. This algorithm allocates the currently optimal service instance to users based on different priorities, thereby ensuring the best service quality.
[0121] Optionally, the performance metrics include video frame rate, latency, and packet loss rate information, and step 500 includes:
[0122] Step 510: If the video frame rate is greater than the first threshold, the latency is less than the second threshold, and the packet loss rate is less than the third threshold, then the highest priority service instance is determined to be in an idle state.
[0123] Step 520: If the video frame rate is between the fourth threshold and the first threshold, or the latency is between the second threshold and the fifth threshold, or the packet loss rate is between the third threshold and the sixth threshold, determine that the highest priority service instance is in a fully loaded state.
[0124] Step 530: If the video frame rate is between 0fps and the fourth threshold, or the latency is greater than the fifth threshold, or the packet loss rate is greater than the sixth threshold, then the highest priority service instance is determined to be in an overloaded state.
[0125] In this embodiment, the first threshold is preferably 25fps, the second threshold is preferably 100ms, the third threshold is 5%, the fourth threshold is 15fps, the fifth threshold is 200ms, and the sixth threshold is 10%. Specifically, by obtaining user feedback on latency, video frame rate (or frame rate), and packet loss rate information, the running status of the highest priority service instance is determined based on performance indicators. The corresponding judgment rules for steps 510 to 530 are shown in Table 1 below:
[0126] Table 1:
[0127] No-load state [25,∞) [0,100) [0,5) and Full load status [15,25) [100,200) [5,10) or Overload condition [0,15) [200,∞) [100,∞) or
[0128] Optionally, the method further includes:
[0129] Step 600: Obtain the current load threshold of the highest priority service instance;
[0130] Step 700: Adjust the current load threshold of the highest priority service instance in real time according to the running status of the highest priority service instance.
[0131] In this embodiment, the current load threshold of the highest priority service instance is adjusted in real time based on its running status, providing a more detailed and in-depth analysis of the problem scenario. Multi-level scheduling standards are set instead of relying solely on a scoring function, making the decision-making process more accurate. At the same time, the weights of the evaluation parameters are adjusted based on service quality feedback, which can train a more accurate decision scoring function.
[0132] Optionally, when CPU is the first weight, memory is the second weight, and bandwidth utilization is the third weight in the current load threshold, step 700 includes:
[0133] If the highest priority service instance is in an idle state, the current load threshold of the highest priority service instance is increased by a first preset range; the first preset range is preferably 0-5%.
[0134] If the highest priority service instance is fully loaded, maintain the current load threshold of the highest priority service instance unchanged, adjust the first weight, the second weight and the third weight, and reacquire the highest priority service instance;
[0135] If the highest priority service instance is overloaded, then the current load threshold of the highest priority service instance is reduced by a second preset range. The second preset range is preferably 0-10%.
[0136] Here, the service instance status is determined based on performance metrics; if the service instance is in an idle state, the load threshold of the service instance is increased by 5% (first preset range); if the service instance is in a fully loaded state, the load threshold is kept unchanged, and the weight of the parameters in the scoring formula (load calculation formula) is adjusted; if the service instance is in an overloaded state, the load threshold of the service instance is decreased by 10% (second preset range).
[0137] The specific implementation plan is as follows:
[0138] If a service instance is in an idle state, increase the load threshold of that service instance by 15 (an increase of 5%).
[0139] If the service instance is at full load, the load threshold remains unchanged, and the weights of the parameters in the scoring formula (the load calculation formula is as follows: p=ax1+bx2+cx3) are adjusted according to the rules shown in Table 2 below:
[0140] Table 2:
[0141] √ × × a and b each increase by 0.1, c decreases by 0.2. √ × √ c increases by 0.2, while a and b each decrease by 0.1. √ √ × a and b each increase by 0.1, c decreases by 0.2. × × √ c increases by 0.2, while a and b each decrease by 0.1. × √ × c increases by 0.2, while a and b each decrease by 0.1. × √ √ c increases by 0.2, while a and b each decrease by 0.1. √ √ √ Keep unchanged
[0142] In Table 2 above, “√” indicates that the current state meets the range conditions for the full load state, while “×” indicates that the current state does not meet the range conditions for the full load state.
[0143] If a service instance is overloaded, reduce the load threshold of that service instance by 30 (a 10% reduction).
[0144] This invention eliminates the need for storing large amounts of historical data and extensive model training. It is more performance-friendly in terms of data storage and computational capabilities for the scheduling service.
[0145] This invention collects real-time service quality information based on user feedback and adjusts the scheduling load threshold and scoring function parameters accordingly. The resulting threshold and scoring function are more adaptable and targeted, providing more accurate real-time audio and video service scheduling and improving the user experience.
[0146] like Figure 2 As shown, an optional embodiment of the present invention provides a service scheduling architecture, including:
[0147] Status Acquisition Module: This module receives status data reported by each audio / video service instance and updates and stores the status of the audio / video service instances in real time. The information reported by the audio / video service instances includes deployment location, CPU utilization, memory utilization, and network I / O bandwidth.
[0148] Scheduling Decision Module: This module receives service allocation requests from users and scores audio and video service instances based on priority, combined with the real-time status of the service cluster and the location of the user's access point. Based on the scoring results, it allocates the best audio and video service instance to the user and provides real-time audio and video services.
[0149] Feedback Adjustment Module: This module collects user audio and video quality information and, based on user feedback, triggers a dynamic reward and punishment mechanism that adjusts the weights of various parameters in the scoring algorithm and switches priority thresholds. Through continuous supervised learning, a unique scoring algorithm is obtained for each audio and video service instance.
[0150] Furthermore, message queue (MQ) components are used for message passing between modules, with RabbitMQ being the preferred choice. Redis is used to store service status data. Redis is a high-performance, open-source key-value database with high read and write performance. It can store mappings between keys and five different value types and persist key-value pairs stored in memory to disk. Users can configure different persistence methods according to their actual use cases. RabbitMQ is a popular open-source message queue system and an implementation of the AMQP (Advanced Message Queuing Protocol) standard. AMQP is an open standard for application layer protocols, designed for message-oriented middleware. It is used to store and forward messages in distributed systems and performs well in terms of ease of use, scalability, and high availability.
[0151] like Figure 3 As shown, in one specific embodiment, the present invention also provides a service scheduling method, including:
[0152] The API service cluster reports service instance status information. The status acquisition module collects and stores the reported service instance status information. When a user sends a request to allocate an audio / video service instance, the API service cluster sends the request scheduling decision to the scheduling decision module. The scheduling decision module queries the status information of the audio / video service cluster, and the status acquisition module returns the query result. The scheduling decision module scores the instances according to priority, selects the highest-scoring service instance, and returns the result to the API service cluster. The API service cluster then returns the audio / video service instance to the current user to provide audio / video services. The current user reports service quality statistics to the API service cluster, i.e., performance parameter information, such as frame latency, video frame rate, and packet loss rate. The API service cluster sends a request to the feedback adjustment module for scheduling score feedback adjustment. The feedback adjustment module adjusts the scoring algorithm threshold and weight based on the service quality information (performance parameters) and sends a notification result to the scheduling decision module. The scheduling decision module then modifies the current service instance scoring algorithm.
[0153] In summary, on the one hand, this invention only stores the real-time status parameters and parameter weights of each service instance, reducing data storage pressure; on the other hand, the decision-making process is simpler, reducing the demand for service computing power; finally, this invention will collect real-time audio and video service quality information through user feedback, intuitively evaluate the scheduling results, and adjust the parameter weights of the scoring function accordingly, solving the problem of inaccurate decision functions affecting scheduling accuracy.
[0154] like Figure 4 As shown, embodiments of the present invention also provide a service scheduling apparatus, comprising:
[0155] The acquisition module 10 is used to acquire service cluster status data stored by the network device and current user information sent by the target user;
[0156] The determination module 20 is used to determine the service instance with the highest priority based on the service cluster status data and the current user information, according to a preset priority scoring rule;
[0157] Processing module 30 is used to provide services to the target user based on the highest priority service instance.
[0158] Optionally, the determining module 20 includes:
[0159] The first determining submodule is used to determine the information of N service instances in the service cluster status data, and each service instance information includes: load degree, number of users, and distance between the service instance and the target user;
[0160] The second determining submodule is used to determine the service instance with the highest priority based on the current user information and the priority allocation principle of the N service instance information; wherein, N≥3;
[0161] The priority of the service instance being the lowest load, the fewest number of users, and the shortest distance between the service instance and the target user decreases in that order.
[0162] Optionally, the second determining submodule includes:
[0163] The first determining unit is configured to, within the same cluster node, determine the service instance with the highest priority among the N service instance information whose load level does not exceed the load threshold and which has the largest number of users; or...
[0164] The second determining unit is configured to, within the same cluster node, if the load levels of none of the N service instance information exceed the load threshold, and the number of users is the same, select the service instance with the lowest load level to determine the service instance with the highest priority; or...
[0165] The third determining unit is configured to, when multiple cluster nodes have the same load and number of users among the N service instance information, select the service instance with the shortest distance to the target user, thus determining the service instance with the highest priority; or...
[0166] The fourth determining unit is used to obtain a candidate service cluster if the load degree of all N service instance information exceeds the load threshold, and to determine the service instance with the shortest distance to the target user and whose load degree does not exceed the load threshold in the candidate service cluster, and to determine the service instance with the highest priority.
[0167] Optionally, the second determining submodule further includes:
[0168] The fifth determining unit is used to determine the CPU, memory, and bandwidth usage of each service instance based on the service cluster status data.
[0169] The unit is used to obtain the load level based on the CPU, the memory, and the bandwidth utilization.
[0170] Optionally, the obtaining unit includes:
[0171] The first determining subunit is used to determine the first product of the CPU and the first preset weight value, the second product of the memory and the second preset weight value, and the third product of the bandwidth utilization rate and the third preset weight value.
[0172] The second determining subunit is used to determine the load degree based on the first product, the second product, and the third product.
[0173] Optionally, the device further includes:
[0174] The second acquisition module is used to acquire the performance metrics fed back by the target user.
[0175] The second determining module is used to determine the running status of the highest priority service instance based on the performance indicators.
[0176] Optionally, the second determining module includes:
[0177] The sixth determining unit is configured to determine that the highest priority service instance is in an idle state if the video frame rate is greater than a first threshold, the latency is less than a second threshold, and the packet loss rate is less than a third threshold.
[0178] The seventh determining unit is configured to determine that the highest priority service instance is in a fully loaded state when the video frame rate is between the fourth threshold and the first threshold, or the latency is between the second threshold and the fifth threshold, or the packet loss rate information is between the third threshold and the sixth threshold.
[0179] The eighth determining unit is used to determine that the highest priority service instance is in an overload state if the video frame rate is between 0fps and the fourth threshold, or the latency is greater than the fifth threshold, or the packet loss rate is greater than the sixth threshold.
[0180] Optionally, the device further includes:
[0181] The third acquisition module is used to acquire the current load of the highest priority service instance;
[0182] The adjustment module is used to adjust the current load of the highest priority service instance in real time based on the running status of the highest priority service instance.
[0183] Optionally, the adjustment module includes:
[0184] The first processing unit is configured to increase the current load threshold of the highest priority service instance by a first preset range if the highest priority service instance is in an idle state.
[0185] The second processing unit is configured to, if the highest priority service instance is in a fully loaded state, maintain the current load threshold of the highest priority service instance unchanged, adjust the first weight, the second weight and the third weight, and reacquire the highest priority service instance;
[0186] The third processing unit is used to reduce the current load threshold of the highest priority service instance to a second preset range if the highest priority service instance is in an overloaded state.
[0187] An embodiment of the present invention provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the steps in the service scheduling method described above and achieve the same technical effect. To avoid repetition, further details are omitted here.
[0188] The processor mentioned above is the processor in the service scheduling method described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0189] In this embodiment of the invention, the module can be implemented in software so that it can be executed by various types of processors. For example, an identified executable code module may include one or more physical or logical blocks of computer instructions, which may be constructed as objects, procedures, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but may include different instructions stored in different bits, which, when logically combined, constitute the module and achieve the module's intended purpose.
[0190] In practice, an executable code module can be a single instruction or many instructions, and can even be distributed across multiple different code segments, different programs, and across multiple memory devices. Similarly, operational data can be identified within the module and can be implemented in any suitable form and organized within any suitable type of data structure. This operational data can be collected as a single dataset or distributed across different locations (including different storage devices), and can exist, at least in part, solely as electronic signals within the system or network.
[0191] When a module can be implemented using software, considering the current level of hardware technology, modules that can be implemented in software can be implemented using hardware circuits by those skilled in the art to achieve the corresponding functions, without considering cost. These hardware circuits include conventional very-large-scale integrated circuits (VLSI) or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules can also be implemented using programmable hardware devices, such as field-programmable gate arrays, programmable array logic, and programmable logic devices.
[0192] The exemplary embodiments described above are with reference to the accompanying drawings. Many different forms and embodiments are feasible without departing from the spirit and teachings of the invention. Therefore, the invention should not be construed as limiting the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided to make the invention complete and convey the scope of the invention to those skilled in the art. In these drawings, component dimensions and relative dimensions may be exaggerated for clarity. The terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. As used herein, unless clearly indicated otherwise, the singular forms “a,” “an,” and “the” are intended to include all such forms. It will be further understood that the terms “comprising” and / or “including”, when used in this specification, indicate the presence of the stated features, integers, steps, operations, components, and / or elements, but do not exclude the presence or addition of one or more other features, integers, steps, operations, components, and / or groups thereof. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of the range and any subranges in between.
[0193] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A service scheduling method, characterized in that, Performed by network devices, including: Obtain the service cluster status data stored in the network device and the current user information sent by the target user; Based on the service cluster status data and the current user information, and according to a preset priority scoring rule, the service instance with the highest priority is determined, including: determining N service instance information in the service cluster status data, each service instance information including: load level and number of users; under the same cluster node, the service instance with the highest load level and the largest number of users among the N service instance information is determined as the service instance with the highest priority, where N≥3; Provide services to the target user based on the highest priority service instance; Obtain the performance metrics reported by the target user; the performance metrics include video frame rate, latency, and packet loss rate information. Based on the performance metrics, the operating status of the highest priority service instance is determined, including: if the video frame rate is greater than a first threshold, the latency is less than a second threshold, and the packet loss rate is less than a third threshold, the highest priority service instance is determined to be in an idle state; if the video frame rate is between a fourth threshold and the first threshold, or the latency is between the second threshold and the fifth threshold, or the packet loss rate is between the third threshold and the sixth threshold, the highest priority service instance is determined to be in a fully loaded state; if the video frame rate is between 0fps and the fourth threshold, or the latency is greater than the fifth threshold, or the packet loss rate is greater than the sixth threshold, the highest priority service instance is determined to be in an overloaded state. The method further includes: Obtain the current load of the highest priority service instance; wherein, determining the load of each service instance includes: determining the CPU, memory, and bandwidth utilization of each service instance based on the service cluster status data; and obtaining the load of each service instance based on the CPU, memory, and bandwidth utilization. Based on the running status of the highest priority service instance, adjust the current load of the highest priority service instance in real time; When CPU is the first weight in the current load, memory is the second weight, and bandwidth utilization is the third weight, The step of adjusting the current load of the highest priority service instance in real time based on its running status includes: If the highest priority service instance is in an idle state, then the current load threshold of the highest priority service instance is increased by a first preset range. If the highest priority service instance is fully loaded, maintain the current load threshold of the highest priority service instance unchanged, adjust the first weight, the second weight and the third weight, and reacquire the highest priority service instance; If the highest priority service instance is overloaded, the current load threshold of the highest priority service instance will be reduced to a second preset range.
2. The method according to claim 1, characterized in that, The load level is obtained based on the CPU, the memory, and the bandwidth utilization, including: Determine the first product of the CPU and the first preset weight value, the second product of the memory and the second preset weight value, and the third product of the bandwidth utilization and the third preset weight value; The load factor is determined based on the first product, the second product, and the third product.
3. A service scheduling device, characterized in that, include: The acquisition module is used to acquire service cluster status data stored by the network device and current user information sent by the target user; The determination module is used to determine the service instance with the highest priority based on the service cluster status data and the current user information, according to a preset priority scoring rule; The processing module is used to provide services to the target user based on the highest priority service instance; The device further includes: The third acquisition module is used to acquire the current load of the highest priority service instance; The adjustment module is used to adjust the current load of the highest priority service instance in real time based on the running status of the highest priority service instance. The adjustment module includes: The first processing unit is configured to increase the current load threshold of the highest priority service instance by a first preset range if the highest priority service instance is in an idle state. The second processing unit is used to maintain the current load threshold of the highest priority service instance unchanged, adjust the first weight, the second weight and the third weight, and reacquire the highest priority service instance when the highest priority service instance is in a fully loaded state. The third processing unit is used to reduce the current load threshold of the highest priority service instance to a second preset range if the highest priority service instance is in an overloaded state. The determining module includes a second determining submodule, which includes: a fifth determining unit, used to determine the CPU, memory, and bandwidth utilization of each service instance based on the service cluster status data; and a obtaining unit, used to obtain the load based on the CPU, memory, and bandwidth utilization. The device further includes: a second acquisition module, configured to acquire performance metrics fed back by the target user; and a second determination module, configured to determine the running status of the highest priority service instance based on the performance metrics; the performance metrics include video frame rate, latency, and packet loss rate information. The second determining module includes: a sixth determining unit, configured to determine that the highest priority service instance is in an idle state if the video frame rate is greater than a first threshold, the latency is less than a second threshold, and the packet loss rate is less than a third threshold; a seventh determining unit, configured to determine that the highest priority service instance is in a fully loaded state if the video frame rate is between a fourth threshold and the first threshold, or the latency is between the second threshold and the fifth threshold, or the packet loss rate is between the third threshold and the sixth threshold; and an eighth determining unit, configured to determine that the highest priority service instance is in an overloaded state if the video frame rate is between 0fps and the fourth threshold, or the latency is greater than the fifth threshold, or the packet loss rate is greater than the sixth threshold. The determining module includes: a first determining submodule, used to determine N service instance information in the service cluster status data, each service instance information including: load level and number of users; a second determining submodule, used to determine the service instance with the highest priority based on the current user information and the priority allocation principle of the N service instance information; wherein, N≥3; the second determining submodule includes: a first determining unit, used to determine the service instance with the highest priority among the N service instance information where the load level does not exceed the load threshold and the number of users is the largest under the same cluster node.
4. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps in the service scheduling method as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Wireless video streaming service self-adaption rate control method based on QoE
CN103888846A
Video content distribution scheduling method, device and system
CN104394441A
Access resource allocation method, device and system, and equipment
CN110784929A
Traffic scheduling method and device, electronic equipment and storage medium
CN112153138A